| 274 | } |
| 275 | |
| 276 | void PyEventLoop::Future::setResult(PyObject *result) { |
| 277 | // https://docs.python.org/3/library/asyncio-future.html#asyncio.Future.set_result |
| 278 | PyObject *ret = PyObject_CallMethod(_future, "set_result", "O", result); // returns None |
| 279 | Py_XDECREF(ret); |
| 280 | } |
| 281 | |
| 282 | void PyEventLoop::Future::setException(PyObject *exception) { |
| 283 | // https://docs.python.org/3/library/asyncio-future.html#asyncio.Future.set_exception |