struct State(usize);
Tuple Fields§
§0: usize
Implementations§
source§impl State
impl State
fn new(num_workers: usize) -> State
fn load(cell: &AtomicUsize, ordering: Ordering) -> State
fn unpark_one(cell: &AtomicUsize, num_searching: usize)
fn inc_num_searching(cell: &AtomicUsize, ordering: Ordering)
sourcefn dec_num_searching(cell: &AtomicUsize) -> bool
fn dec_num_searching(cell: &AtomicUsize) -> bool
Returns true
if this is the final searching worker
sourcefn dec_num_unparked(cell: &AtomicUsize, is_searching: bool) -> bool
fn dec_num_unparked(cell: &AtomicUsize, is_searching: bool) -> bool
Track a sleeping worker
Returns true
if this is the final searching worker.
sourcefn num_searching(self) -> usize
fn num_searching(self) -> usize
Number of workers currently searching
sourcefn num_unparked(self) -> usize
fn num_unparked(self) -> usize
Number of workers currently unparked
Trait Implementations§
impl Copy for State
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
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