Skip to main content

Module command_gate

Module command_gate 

Source

Structs§

AloneGuard
Held by a transaction or a script: no other command is running, and none starts, until this is dropped.
Guard
Held by a command for as long as it runs.

Functions§

alone_on_this_thread
Whether the calling thread holds the gate alone — whether what it is running is part of a transaction or a script.
enter
Enter the gate as an ordinary command.
enter_alone
Enter the gate alone: wait for every command in flight to finish, and hold back new ones, until the guard is dropped.
enter_alone_unless
enter_alone, for a caller that will not wait for ever — a second script, arriving as the first starts. See enter_unless.
enter_unless
enter, for a caller that will not wait for ever: each time slice has passed and the gate is still held alone, give_up is asked whether to stop waiting. None if it said yes.
skips
Commands that do not go through the gate.
taker_waiting
Whether anything is taking the gate alone, or holds it alone: for a holder of the gate that can let go of it between steps of its work.