* @brief Decrement the counter for the number of our job functions in the Python event-loop */
| 287 | * @brief Decrement the counter for the number of our job functions in the Python event-loop |
| 288 | */ |
| 289 | inline void decCounter() { |
| 290 | _counter--; |
| 291 | if (_counter == 0) { // no job queueing |
| 292 | // Notify that the queue is empty and awake (unblock) the event-loop shield |
| 293 | Py_XDECREF(PyObject_CallMethod(_queueIsEmpty, "set", NULL)); // _queueIsEmpty.set() |
| 294 | } else if (_counter < 0) { // something went wrong |
| 295 | PyErr_SetString(PyExc_RuntimeError, "Event-loop job counter went below zero."); |
| 296 | } |
| 297 | } |
| 298 | |
| 299 | /** |
| 300 | * @brief An `asyncio.Event` instance to notify that there are no queued asynchronous jobs |
no outgoing calls
no test coverage detected