Skip to main content

current_bind_gate_is_shared

Function current_bind_gate_is_shared 

Source
pub fn current_bind_gate_is_shared() -> bool
Expand description

True while the job on this worker is a route bind that holds its actor’s epoch gate only for reading.

Most route binds re-attach a session to a root whose configuration is unchanged. That rebind only reads the published configuration and records the session in state behind its own locks, so it is safe next to readers, and making it wait for exclusive use would park it behind a configure tail unit that can run for many seconds on a large root, or behind a slow interactive read for as long as that read runs. Such a bind starts with a shared hold beside whatever already holds the gate for reading; a configure that turns out to change the root calls request_exclusive_rerun before its first change to actor state.