Home
libucxx
libucxx
ucxx
nightly (0.53)
nightly (0.53)
stable (0.52)
legacy (0.51)
Toggle main menu visibility
Loading...
Searching...
No Matches
python
include
ucxx
python
worker.h
1
5
#pragma once
6
7
#include <functional>
8
#include <memory>
9
#include <mutex>
10
#include <queue>
11
#include <thread>
12
13
#include <ucp/api/ucp.h>
14
15
#include <ucxx/python/future.h>
16
#include <ucxx/python/notifier.h>
17
#include <ucxx/worker.h>
18
19
namespace
ucxx
{
20
21
namespace
python {
22
29
class
Worker :
public
::ucxx::Worker
{
30
private
:
46
Worker(std::shared_ptr<Context> context,
47
const
bool
enableDelayedSubmission =
false
,
48
const
bool
enableFuture =
false
);
49
50
public
:
51
Worker() =
delete
;
52
Worker(
const
Worker&) =
delete
;
53
Worker& operator=(Worker
const
&) =
delete
;
54
Worker(Worker&& o) =
delete
;
55
Worker& operator=(Worker&& o) =
delete
;
56
85
friend
std::shared_ptr<::ucxx::Worker>
createWorker
(std::shared_ptr<Context> context,
86
const
bool
enableDelayedSubmission,
87
const
bool
enableFuture);
88
99
void
populateFuturesPool
()
override
;
100
110
void
clearFuturesPool
()
override
;
111
121
[[nodiscard]] std::shared_ptr<::ucxx::Future>
getFuture
()
override
;
122
135
[[nodiscard]]
RequestNotifierWaitState
waitRequestNotifier
(uint64_t periodNs)
override
;
136
147
void
runRequestNotifier
()
override
;
148
154
void
stopRequestNotifierThread
()
override
;
155
};
156
157
}
// namespace python
158
159
}
// namespace ucxx
ucxx::Worker
Component encapsulating a UCP worker.
Definition
worker.h:62
ucxx::python::Worker::waitRequestNotifier
RequestNotifierWaitState waitRequestNotifier(uint64_t periodNs) override
Block until a request event.
ucxx::python::Worker::createWorker
friend std::shared_ptr<::ucxx::Worker > createWorker(std::shared_ptr< Context > context, const bool enableDelayedSubmission, const bool enableFuture)
Constructor of shared_ptr<ucxx::python::Worker>.
ucxx::python::Worker::populateFuturesPool
void populateFuturesPool() override
Populate the Python futures pool.
ucxx::python::Worker::runRequestNotifier
void runRequestNotifier() override
Notify Python futures of each completed communication request.
ucxx::python::Worker::clearFuturesPool
void clearFuturesPool() override
Clear the futures pool.
ucxx::python::Worker::getFuture
std::shared_ptr<::ucxx::Future > getFuture() override
Get a Python future from the pool.
ucxx::python::Worker::stopRequestNotifierThread
void stopRequestNotifierThread() override
Signal the notifier to terminate.
ucxx
Definition
address.h:16
ucxx::RequestNotifierWaitState
RequestNotifierWaitState
The state with which a wait operation completed.
Definition
notifier.h:26
Generated by
1.18.0