Struct parking_lot_core::UnparkResult
source · [−]pub struct UnparkResult {
pub unparked_threads: usize,
pub requeued_threads: usize,
pub have_more_threads: bool,
pub be_fair: bool,
/* private fields */
}
Expand description
Result of an unpark operation.
Fields
unparked_threads: usize
The number of threads that were unparked.
requeued_threads: usize
The number of threads that were requeued.
have_more_threads: bool
Whether there are any threads remaining in the queue. This only returns true if a thread was unparked.
be_fair: bool
This is set to true on average once every 0.5ms for any given key. It should be used to switch to a fair unlocking mechanism for a particular unlock.
Trait Implementations
sourceimpl Clone for UnparkResult
impl Clone for UnparkResult
sourcefn clone(&self) -> UnparkResult
fn clone(&self) -> UnparkResult
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for UnparkResult
impl Debug for UnparkResult
sourceimpl Default for UnparkResult
impl Default for UnparkResult
sourcefn default() -> UnparkResult
fn default() -> UnparkResult
Returns the “default value” for a type. Read more
sourceimpl PartialEq<UnparkResult> for UnparkResult
impl PartialEq<UnparkResult> for UnparkResult
sourcefn eq(&self, other: &UnparkResult) -> bool
fn eq(&self, other: &UnparkResult) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &UnparkResult) -> bool
fn ne(&self, other: &UnparkResult) -> bool
This method tests for !=
.
impl Copy for UnparkResult
impl Eq for UnparkResult
impl StructuralEq for UnparkResult
impl StructuralPartialEq for UnparkResult
Auto Trait Implementations
impl RefUnwindSafe for UnparkResult
impl Send for UnparkResult
impl Sync for UnparkResult
impl Unpin for UnparkResult
impl UnwindSafe for UnparkResult
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more