| 286 | } |
| 287 | |
| 288 | void PyEventLoop::Future::addDoneCallback(PyObject *cb) { |
| 289 | // https://docs.python.org/3.9/library/asyncio-future.html#asyncio.Future.add_done_callback |
| 290 | PyObject *ret = PyObject_CallMethod(_future, "add_done_callback", "O", cb); // returns None |
| 291 | Py_XDECREF(ret); |
| 292 | } |
| 293 | |
| 294 | bool PyEventLoop::Future::isCancelled() { |
| 295 | // https://docs.python.org/3.9/library/asyncio-future.html#asyncio.Future.cancelled |