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§
source§impl Clone for UnparkResult
impl Clone for UnparkResult
source§fn clone(&self) -> UnparkResult
fn clone(&self) -> UnparkResult
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for UnparkResult
impl Debug for UnparkResult
source§impl Default for UnparkResult
impl Default for UnparkResult
source§fn default() -> UnparkResult
fn default() -> UnparkResult
Returns the “default value” for a type. Read more
source§impl PartialEq for UnparkResult
impl PartialEq for UnparkResult
source§fn 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 ==
.impl Copy for UnparkResult
impl Eq for UnparkResult
impl StructuralPartialEq for UnparkResult
Auto Trait Implementations§
impl Freeze for UnparkResult
impl RefUnwindSafe for UnparkResult
impl Send for UnparkResult
impl Sync for UnparkResult
impl Unpin for UnparkResult
impl UnwindSafe for UnparkResult
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)