MCPcopy Create free account
hub / github.com/Distributive-Network/PythonMonkey / decCounter

Method decCounter

include/PyEventLoop.hh:289–297  ·  view source on GitHub ↗

* @brief Decrement the counter for the number of our job functions in the Python event-loop */

Source from the content-addressed store, hash-verified

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

Callers 3

eventLoopJobWrapperFunction · 0.80
futureOnDoneCallbackFunction · 0.80
removeRefMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected