pub enum CpuContextError {
InvalidThreadCount,
TooManyWorkers {
workers: usize,
cpus: usize,
},
PoolBuild {
source: ThreadPoolBuildError,
},
WorkerPinning {
worker: usize,
cpu: CpuId,
source: CpuAffinityError,
},
WorkerStartupClosed {
source: RecvError,
},
}Expand description
Failure to construct a CPU context with pinned Rayon workers.
§Examples
use tenferro_cpu::CpuContextError;
let error = CpuContextError::InvalidThreadCount;
assert!(error.to_string().contains("thread count"));Variants§
InvalidThreadCount
A context must contain at least one worker.
TooManyWorkers
A pinned engine cannot create more workers than assigned CPUs.
Fields
PoolBuild
Rayon could not construct the custom thread pool.
Fields
§
source: ThreadPoolBuildErrorRayon or OS thread-spawn error.
WorkerPinning
A worker could not set or verify its assigned CPU affinity.
Fields
§
source: CpuAffinityErrorOS or verification failure.
WorkerStartupClosed
A worker terminated before reporting startup affinity.
Trait Implementations§
Source§impl Debug for CpuContextError
impl Debug for CpuContextError
Source§impl Display for CpuContextError
impl Display for CpuContextError
Source§impl Error for CpuContextError
impl Error for CpuContextError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for CpuContextError
impl !RefUnwindSafe for CpuContextError
impl Send for CpuContextError
impl Sync for CpuContextError
impl Unpin for CpuContextError
impl UnsafeUnpin for CpuContextError
impl !UnwindSafe for CpuContextError
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