![]() |
dfx 0.1.0
Linux-based dynamic dataflow executor
|
Node-scoped proxy implementation of FdWatch::Poller. More...
#include <dfx-runtime-api/PollerProxy.hpp>
Public Member Functions | |
| PollerProxy (Core::NodeWPtr node, NodeReactor &reactor) | |
| Construct a poller proxy bound to a given node. | |
| void | registerFd (FdWatch::BorrowedFd fd, FdWatch::EventInterests events, FdWatch::FdCallback cb) override |
| Register a file descriptor for event notifications. | |
| void | deregisterFd (FdWatch::BorrowedFd fd) noexcept override |
| Deregister a previously registered file descriptor. | |
| void | deferCall (FdWatch::Callback cb) override |
| Schedule a callback to run later in the reactor context. | |
| Public Member Functions inherited from dfx::FdWatch::Poller | |
| virtual | ~Poller ()=default |
| Virtual destructor for interface. | |
| virtual void | registerFd (BorrowedFd fd, EventInterests events, FdCallback cb)=0 |
| Registers a file descriptor with the poller. | |
Node-scoped proxy implementation of FdWatch::Poller.
This class adapts the generic FdWatch::Poller interface to the runtime's node-centric reactor model.
The proxy does not own any resources itself; it simply forwards:
The forwarding is performed while attaching the node identity (a Core::NodeWPtr), allowing the reactor to:
A proxy is used to implement the dfx::Core::Node::poller() function and can be used by any node.
|
inline |
Construct a poller proxy bound to a given node.
| node | Node identity to associate with all forwarded operations. |
| reactor | Reactor that owns the actual registration/defer mechanism. |
|
inlineoverridevirtual |
Schedule a callback to run later in the reactor context.
Forwards to NodeReactor::deferNodeCall while attaching the node identity.
| cb | Callback to execute later. |
Implements dfx::FdWatch::Poller.
|
inlineoverridevirtualnoexcept |
Deregister a previously registered file descriptor.
Forwards to NodeReactor::deregisterNodeFd.
| fd | Borrowed FD previously passed to registerFd. |
Implements dfx::FdWatch::Poller.
|
inlineoverride |
Register a file descriptor for event notifications.
Forwards to NodeReactor::registerNodeFd while attaching the node identity.
| fd | Borrowed FD to watch (not owned by the poller). |
| events | Interest mask (read/write/error, etc.). |
| cb | Callback invoked when the FD becomes ready. |