| 264 | struct Lock { |
| 265 | public: |
| 266 | explicit Lock() { |
| 267 | PyObject *asyncio = PyImport_ImportModule("asyncio"); |
| 268 | _queueIsEmpty = PyObject_CallMethod(asyncio, "Event", NULL); // _queueIsEmpty = asyncio.Event() |
| 269 | Py_DECREF(asyncio); |
| 270 | |
| 271 | // The flag should initially be set as the queue is initially empty |
| 272 | Py_XDECREF(PyObject_CallMethod(_queueIsEmpty, "set", NULL)); // _queueIsEmpty.set() |
| 273 | }; |
| 274 | ~Lock() { |
| 275 | Py_DECREF(_queueIsEmpty); |
| 276 | } |
nothing calls this directly
no outgoing calls
no test coverage detected