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

Method cancelled

src/PyEventLoop.cc:260–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260bool PyEventLoop::AsyncHandle::cancelled() {
261 // https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.Handle.cancelled
262 PyObject *ret = PyObject_CallMethod(_handle, "cancelled", NULL); // returns Python bool
263 bool cancelled = ret == Py_True;
264 Py_XDECREF(ret);
265 return cancelled;
266}
267
268bool PyEventLoop::AsyncHandle::_finishedOrCancelled() {
269 PyObject *scheduled = PyObject_GetAttrString(_handle, "_scheduled"); // this attribute only exists on asyncio.TimerHandle returned by loop.call_later

Callers 1

timerJobWrapperFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected