pub struct NotifyWaitSet { /* private fields */ }Expand description
Put-notify completion wait-set — the C dbNotify.c processNotify
waitList analogue (dbNotifyAdd / dbNotifyCompletion).
A ca_put_callback / WRITE_NOTIFY completion must fire only after the
originating (put-target) record AND every record reached through its
FLNK / OUT / process-action dispatch chain (synchronous or async)
has finished processing. A single wait-set owns the completion
oneshot; only it fires, and only when the last chain member leaves.
Counting convention: Self::new arms pending = 1 for the
originating record (which always joins). Every additional PP target
that will process under the active notify Self::enters on join
(C dbNotifyAdd), and every record Self::leaves when its
processing completes (C dbNotifyCompletion). The oneshot fires on
the leave that drops pending to zero.
Implementations§
Source§impl NotifyWaitSet
impl NotifyWaitSet
Sourcepub fn new(tx: Sender<()>) -> Arc<Self> ⓘ
pub fn new(tx: Sender<()>) -> Arc<Self> ⓘ
Arm a wait-set whose tx fires when the chain settles. pending
starts at 1 for the originating record — its completion leaves
that implicit slot, so a put with no chain targets fires
immediately on the originating record’s own completion.
Sourcepub fn enter(&self)
pub fn enter(&self)
A PP target joined the chain (C dbNotifyAdd). Balanced by exactly
one Self::leave.
Sourcepub fn leave(&self)
pub fn leave(&self)
A record finished its contribution (C dbNotifyCompletion). Fires
the completion oneshot on the leave that empties the set.
Sourcepub fn completed(&self) -> bool
pub fn completed(&self) -> bool
True once every chain member has left (the completion has fired).
Used by the put entry to decide synchronous (ProcessCompletion::Sync)
vs async-pending (ProcessCompletion::Async) completion.