Module futex

Source

Structsยง

CompletionGuard ๐Ÿ”’
Once
OnceState

Constantsยง

COMPLETE ๐Ÿ”’
Initialization has completed and all future calls should finish immediately.
INCOMPLETE ๐Ÿ”’
No initialization has run yet, and no thread is currently using the Once.
POISONED ๐Ÿ”’
Some thread has previously attempted to initialize the Once, but it panicked, so the Once is now poisoned. There are no other threads currently accessing this Once.
QUEUED ๐Ÿ”’
May only be set if the state is not COMPLETE.
RUNNING ๐Ÿ”’
Some thread is currently attempting to run initialization. It may succeed, so all future threads need to wait for it to finish.
STATE_MASK ๐Ÿ”’