Re-exportsΒ§
use std::cell::Cell;πuse std::collections::hash_map::DefaultHasher;πuse std::hash::Hasher;πuse std::sync::atomic::AtomicUsize;πuse std::sync::atomic::Ordering;πuse std::sync::Arc;πuse std::sync::Mutex;πuse std::sync::Once;πuse std::fmt;πuse std::io;πuse std::mem;πuse std::ptr;πuse std::thread;πuse crossbeam_deque::Injector;πuse crossbeam_deque::Steal;πuse crossbeam_deque::Stealer;πuse crossbeam_deque::Worker;πuse smallvec::SmallVec;πuse crate::job::JobFifo;πuse crate::job::JobRef;πuse crate::job::StackJob;πuse crate::latch::AsCoreLatch;πuse crate::latch::CoreLatch;πuse crate::latch::Latch;πuse crate::latch::LatchRef;πuse crate::latch::LockLatch;πuse crate::latch::OnceLatch;πuse crate::latch::SpinLatch;πuse crate::sleep::Sleep;πuse crate::tlv::Tlv;πuse crate::AcquireThreadHandler;πuse crate::DeadlockHandler;πuse crate::ErrorKind;πuse crate::ExitHandler;πuse crate::PanicHandler;πuse crate::ReleaseThreadHandler;πuse crate::StartHandler;πuse crate::ThreadPoolBuildError;πuse crate::ThreadPoolBuilder;πuse crate::Yield;πuse crate::unwind;π
StructsΒ§
- Custom
Spawn - Spawns a thread with a userβs custom callback.
- Default
Spawn - Spawns a thread in the βnormalβ way with
std::thread::Builder. - Registry
- Registry
Id π - Terminator π
- Thread
Builder - Thread builder used for customization via
ThreadPoolBuilder::spawn_handler. - Thread
Info π - Worker
Thread π - XorShift64
Star π - xorshift* is a fast pseudorandom number generator which will even tolerate weak seeding, as long as itβs not zero.
ConstantsΒ§
- WORKER_
THREAD_ πSTATE
StaticsΒ§
- THE_
REGISTRY π - THE_
REGISTRY_ πSET
TraitsΒ§
- Thread
Spawn - Generalized trait for spawning a thread in the
Registry.
FunctionsΒ§
- default_
global_ πregistry - global_
registry π - Starts the worker threads (if that has not already happened). If initialization has not already occurred, use the default configuration.
- in_
worker π - If already in a worker-thread, just execute
op. Otherwise, executeopin the default thread-pool. Either way, block untilopcompletes and return its return value. Ifoppanics, that panic will be propagated as well. The second argument indicatestrueif injection was performed,falseif executed directly. - init_
global_ πregistry - Starts the worker threads (if that has not already happened) with the given builder.
- main_
loop π β - mark_
blocked_ and_ wait - Mark a Rayon worker thread as blocked. This triggers the deadlock handler if no other worker thread is active. Then wait for the user-specified condition.
- mark_
unblocked - Mark a previously blocked Rayon worker thread as unblocked
- set_
global_ πregistry - Starts the worker threads (if that has not already happened) by creating a registry with the given callback.