pub struct PartitionRuntime { /* private fields */ }Expand description
The resolved placement and its pinned pools, built once and shared behind an Arc by every PartitionedSum that runs on it.
Implementations§
Source§impl PartitionRuntime
impl PartitionRuntime
Sourcepub fn new(config: &PartitionConfig) -> Result<Arc<Self>, TopologyError>
pub fn new(config: &PartitionConfig) -> Result<Arc<Self>, TopologyError>
Resolves config against the machine and builds one pinned pool per partition.
§Errors
Whatever PartitionConfig::num_partitions reports (a partition count that is not a power of two, an empty or out-of-mask explicit CPU set), or TopologyError::Io if a pool cannot be built.
Sourcepub fn num_partitions(&self) -> usize
pub fn num_partitions(&self) -> usize
Partitions in the group — always a power of two.
Auto Trait Implementations§
impl Freeze for PartitionRuntime
impl !RefUnwindSafe for PartitionRuntime
impl Send for PartitionRuntime
impl Sync for PartitionRuntime
impl Unpin for PartitionRuntime
impl !UnwindSafe for PartitionRuntime
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