struct Splitter {
splits: usize,
}
Expand description
A splitter controls the policy for splitting into smaller work items.
Thief-splitting is an adaptive policy that starts by splitting into enough jobs for every worker thread, and then resets itself whenever a job is actually stolen into a different thread.
Fields§
§splits: usize
The splits
tell us approximately how many remaining times we’d
like to split this job. We always just divide it by two though, so
the effective number of pieces will be next_power_of_two()
.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Splitter
impl RefUnwindSafe for Splitter
impl Send for Splitter
impl Sync for Splitter
impl Unpin for Splitter
impl UnwindSafe for Splitter
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more