![]() |
dfx 0.1.0
Linux-based dynamic dataflow executor
|
Node-aware reactor API for FD watching and deferred execution in the runtime. More...
#include <dfx-runtime-api/NodeReactor.hpp>
Public Member Functions | |
| virtual void | registerNodeFd (FdWatch::BorrowedFd fd, FdWatch::EventInterests events, FdWatch::FdCallback cb, Core::NodeWPtr node)=0 |
| Register a file descriptor for a specific node. | |
| virtual void | deregisterNodeFd (FdWatch::BorrowedFd fd) noexcept=0 |
| Deregister a previously registered file descriptor. | |
| virtual void | deferNodeCall (FdWatch::Callback cb, Core::NodeWPtr node)=0 |
| Defer execution of a callback associated with a node. | |
Node-aware reactor API for FD watching and deferred execution in the runtime.
NodeReactor is the runtime-facing abstraction used to integrate node-owned event sources (typically Linux file descriptors) into the runtime's event loop / scheduling model.
Unlike FdWatch::Poller, this API is explicitly node-aware: every operation is associated with a node identity (Core::NodeWPtr). This enables the runtime to:
|
pure virtual |
Defer execution of a callback associated with a node.
Schedules cb to run later under the reactor's execution model (typically the runtime's event loop / dispatcher). The association to node allows the reactor to suppress or handle callbacks safely if the node has expired.
| cb | Callback to execute later. |
| node | Node identity used for attribution and lifetime rules. |
Implemented in dfx::Runtime::Scheduler.
|
pure virtualnoexcept |
Deregister a previously registered file descriptor.
Removes fd from the reactor's polling mechanism and clears any associated bookkeeping.
| fd | Borrowed file descriptor previously registered with registerNodeFd. |
Implemented in dfx::Runtime::Scheduler.
|
pure virtual |
Register a file descriptor for a specific node.
Registers fd with the reactor and associates the watch with node. The reactor is responsible for integrating the FD into its polling mechanism (can be done via an underlying FdWatch::Poller) and for enforcing node-lifetime behavior when dispatching cb.
| fd | Borrowed file descriptor to watch (not owned by the reactor). |
| events | Interest mask describing which events to observe. |
| cb | Callback invoked when the FD becomes ready. |
| node | Node identity used for attribution and lifetime rules. |
Implemented in dfx::Runtime::Scheduler.