pub struct Dispatcher(/* private fields */);Expand description
First-class dispatcher (D21), cloneable handle over shared inner state. A graph binds one; the default is a thread-local singleton (D26).
Implementations§
Source§impl Dispatcher
impl Dispatcher
Sourcepub fn set_recording(&self, on: bool)
pub fn set_recording(&self, on: bool)
Turn the profile recorder on/off (D39). Off = near-zero invoke overhead.
Sourcepub fn stat_for(&self, handle: Handle) -> Option<ProfileStat>
pub fn stat_for(&self, handle: Handle) -> Option<ProfileStat>
Read one handle’s accumulated counters.
Sourcepub fn set_local_async_driver(&self, driver: Option<Rc<dyn LocalAsyncDriver>>)
pub fn set_local_async_driver(&self, driver: Option<Rc<dyn LocalAsyncDriver>>)
Install or clear the graph-local async/time source driver (D111).
Sourcepub fn local_async_driver(&self) -> Option<Rc<dyn LocalAsyncDriver>>
pub fn local_async_driver(&self) -> Option<Rc<dyn LocalAsyncDriver>>
Read the installed local async/time source driver, if any.
Sourcepub fn register(&self, f: NodeFn) -> Handle
pub fn register(&self, f: NodeFn) -> Handle
Register a fn in the sync pool, returning its Handle (R-dispatch-all).
Sourcepub fn register_async(&self, f: NodeFn) -> Handle
pub fn register_async(&self, f: NodeFn) -> Handle
Register a fn in the LocalAsync pool (D20). The invoke is still sync void (R-sync-core) — the node’s async-pool kind drives the deferred-emit / pause buffering behavior, not the call mechanism.
Sourcepub fn pool_kind(&self, pool_id: u32) -> PoolKind
pub fn pool_kind(&self, pool_id: u32) -> PoolKind
The kind of a pool by id — the node reads this to decide async-paused buffering + per-invocation ctx snapshotting (R-pause-modes / R-async-paused).
Sourcepub fn unregister(&self, handle: Handle)
pub fn unregister(&self, handle: Handle)
Free a node’s fn slot (B32) — called from NodeInner::Drop. The pool stops
holding a dropped node’s fn (and thus its captured upstream Cores) alive for
the whole process. Idempotent / generation-checked: a stale unregister is a no-op.
Trait Implementations§
Source§impl Clone for Dispatcher
impl Clone for Dispatcher
Source§fn clone(&self) -> Dispatcher
fn clone(&self) -> Dispatcher
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more