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

Method cancel

src/PyEventLoop.cc:242–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240}
241
242void PyEventLoop::AsyncHandle::cancel() {
243 if (!_finishedOrCancelled()) {
244 removeRef(); // automatically unref at finish
245 }
246
247 // https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.Handle.cancel
248 PyObject *ret = PyObject_CallMethod(_handle, "cancel", NULL); // returns None
249 Py_XDECREF(ret);
250}
251
252/* static */
253bool PyEventLoop::AsyncHandle::cancelAll() {

Callers 2

cancelAllMethod · 0.80
cancelByTimeoutIdFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected