Enum parking_lot::OnceState
[−]
[src]
pub enum OnceState { New, Poisoned, InProgress, Done, }
Current state of a Once
.
Variants
New
A closure has not been executed yet
Poisoned
A closure was executed but panicked.
InProgress
A thread is currently executing a closure.
Done
A closure has completed sucessfully.
Methods
impl OnceState
[src]
fn poisoned(&self) -> bool
[src]
Returns whether the associated Once
has been poisoned.
Once an initalization routine for a Once
has panicked it will forever
indicate to future forced initialization routines that it is poisoned.
fn done(&self) -> bool
[src]
Returns whether the associated Once
has successfullly executed a
closure.
Note that you generally need an Acquire
barrier after checking this to
ensure that operations are correctly ordered with regards to a
concurrently executing closure.
Trait Implementations
impl Copy for OnceState
[src]
impl Clone for OnceState
[src]
fn clone(&self) -> OnceState
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for OnceState
[src]
impl PartialEq for OnceState
[src]
fn eq(&self, __arg_0: &OnceState) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.