Home
libucxx
libucxx
ucxx
nightly (0.53)
nightly (0.53)
stable (0.52)
legacy (0.51)
Toggle main menu visibility
Loading...
Searching...
No Matches
include
ucxx
future.h
1
5
#pragma once
6
7
#include <memory>
8
9
#include <ucp/api/ucp.h>
10
11
#include <ucxx/notifier.h>
12
13
namespace
ucxx
{
14
21
class
Future
:
public
std::enable_shared_from_this<Future> {
22
protected
:
23
std::shared_ptr<Notifier>
_notifier
{
nullptr
};
24
35
explicit
Future
(std::shared_ptr<Notifier> notifier) :
_notifier
(notifier) {}
36
37
public
:
38
Future
() =
delete
;
39
Future
(
const
Future
&) =
delete
;
40
Future
& operator=(
Future
const
&) =
delete
;
41
Future
(
Future
&& o) =
delete
;
42
Future
& operator=(
Future
&& o) =
delete
;
43
49
virtual
~Future
() {}
50
61
virtual
void
notify
(ucs_status_t status) = 0;
62
72
virtual
void
set
(ucs_status_t status) = 0;
73
88
[[nodiscard]]
virtual
void
*
getHandle
() = 0;
89
101
[[nodiscard]]
virtual
void
*
release
() = 0;
102
};
103
104
}
// namespace ucxx
ucxx::Future
Represent a future that may be notified by a specialized notifier.
Definition
future.h:21
ucxx::Future::getHandle
virtual void * getHandle()=0
Get the underlying handle but does not release ownership.
ucxx::Future::notify
virtual void notify(ucs_status_t status)=0
Inform the notifier that the future has completed.
ucxx::Future::release
virtual void * release()=0
Get the underlying handle and release ownership.
ucxx::Future::Future
Future(std::shared_ptr< Notifier > notifier)
Construct a future that may be notified from a notifier object.
Definition
future.h:35
ucxx::Future::~Future
virtual ~Future()
Virtual destructor.
Definition
future.h:49
ucxx::Future::set
virtual void set(ucs_status_t status)=0
Set the future completion status.
ucxx::Future::_notifier
std::shared_ptr< Notifier > _notifier
The notifier object.
Definition
future.h:23
ucxx
Definition
address.h:16
Generated by
1.18.0