pub struct ReloadMailbox { /* private fields */ }Expand description
A reload-signal mail slot (B5d). The reload callback (built by
reload_callback_from_mailbox) captures a clone; the TUI installs a
tokio unbounded sender after it starts. When a plugin calls
runtime_action(Reload), the callback signals () (if a TUI is installed)
and the TUI performs the reload asynchronously — the plugin’s call
returns Ok(null) immediately, so the calling plugin’s cdylib is NOT
unmapped while its runtime_action frame is still on the stack (the reload,
which drops the old keepalive, happens after the call returns). This breaks
the self-unmapping race a synchronous plugin-initiated reload would have.
rpi-extensions carries only () (no pi-cli TuiMessage type) — preserving
the leaf DAG. The TUI owns the receiver + the actual reload routine.
Implementations§
Source§impl ReloadMailbox
impl ReloadMailbox
Sourcepub fn install(&self, tx: UnboundedSender<()>)
pub fn install(&self, tx: UnboundedSender<()>)
Install the TUI’s reload-signal sender (after the TUI starts). Replaces
any prior sender. The TUI drops the receiver on shutdown; a sender held
here keeps the channel half-open, so [clear] on shutdown is advised.
Trait Implementations§
Source§impl Clone for ReloadMailbox
impl Clone for ReloadMailbox
Source§fn clone(&self) -> ReloadMailbox
fn clone(&self) -> ReloadMailbox
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more