12 #include <ucp/api/ucp.h>
14 #include <ucxx/future.h>
15 #include <ucxx/notifier.h>
16 #include <ucxx/python/future.h>
30 PyObject* _asyncioEventLoop{
nullptr};
31 PyObject* _handle{
nullptr};
47 explicit Future(PyObject* asyncioEventLoop, std::shared_ptr<::ucxx::Notifier> notifier);
68 std::shared_ptr<::ucxx::Notifier> notifier);
85 PyObject* asyncioEventLoop, std::shared_ptr<::ucxx::Notifier> notifier);
115 void set(ucs_status_t status);
Represent a future that may be notified by a specialized notifier.
Definition: future.h:21
Specialized Python implementation of a ucxx::Future.
Definition: python_future.h:28
void * release()
Get the underlying PyObject* handle and release ownership.
virtual ~Future()
Virtual destructor.
void set(ucs_status_t status)
Set the future completion status.
void notify(ucs_status_t status)
Inform the notifier thread that the future has completed.
friend std::shared_ptr<::ucxx::Future > createFutureWithEventLoop(PyObject *asyncioEventLoop, std::shared_ptr<::ucxx::Notifier > notifier)
Constructor of shared_ptr<ucxx::python::Future>.
void * getHandle()
Get the underlying PyObject* handle but does not release ownership.
friend std::shared_ptr<::ucxx::Future > createFuture(std::shared_ptr<::ucxx::Notifier > notifier)
Constructor of shared_ptr<ucxx::python::Future>.