| 266 | } |
| 267 | |
| 268 | bool PyEventLoop::AsyncHandle::_finishedOrCancelled() { |
| 269 | PyObject *scheduled = PyObject_GetAttrString(_handle, "_scheduled"); // this attribute only exists on asyncio.TimerHandle returned by loop.call_later |
| 270 | // NULL if no such attribute (on a strict asyncio.Handle returned by loop.call_soon) |
| 271 | bool notScheduled = scheduled && scheduled == Py_False; // not scheduled means the job function has already been executed or canceled |
| 272 | Py_XDECREF(scheduled); |
| 273 | return notScheduled; |
| 274 | } |
| 275 | |
| 276 | void PyEventLoop::Future::setResult(PyObject *result) { |
| 277 | // https://docs.python.org/3/library/asyncio-future.html#asyncio.Future.set_result |
nothing calls this directly
no outgoing calls
no test coverage detected