diff --git a/python/rapidsmpf/rapidsmpf/streaming/_detail/libcoro_spawn_task.pxd b/python/rapidsmpf/rapidsmpf/streaming/_detail/libcoro_spawn_task.pxd index 2b1f8131b..0c611771a 100644 --- a/python/rapidsmpf/rapidsmpf/streaming/_detail/libcoro_spawn_task.pxd +++ b/python/rapidsmpf/rapidsmpf/streaming/_detail/libcoro_spawn_task.pxd @@ -9,6 +9,14 @@ cdef extern from * nogil: #include #include + /** + * @brief Callback used to resolve a Python asyncio.Future from C++. + * + * Takes an opaque pointer to the Python Future and an optional + * null-terminated error message. NULL means success. + */ + using PyFutureCallback = void (*)(void*, const char *); + /** * @brief Await a C++ coro::task and notify a Python asyncio.Future on completion. * @@ -34,7 +42,7 @@ cdef extern from * nogil: * and the Python Future has been notified. */ coro::task cython_libcoro_task_wrapper( - void (*cpp_set_py_future)(void*, const char *), + PyFutureCallback cpp_set_py_future, rapidsmpf::OwningWrapper py_future, coro::task task ) {