StructsΒ§
- Spawns a thread with a userβs custom callback.
- Spawns a thread in the βnormalβ way with
std::thread::Builder
. - Registry π
- Registry
Id π - Terminator π
- Thread builder used for customization via
ThreadPoolBuilder::spawn_handler
. - Thread
Info π - Worker
Thread π//////////////////////////////////////////////////////////////////////// WorkerThread identifiers - 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 π//////////////////////////////////////////////////////////////////////// Initialization - THE_
REGISTRY_ πSET
TraitsΒ§
- Generalized trait for spawning a thread in the
Registry
.
FunctionsΒ§
- 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 executeop
. Otherwise, executeop
in the default thread-pool. Either way, block untilop
completes and return its return value. Ifop
panics, that panic will be propagated as well. The second argument indicatestrue
if injection was performed,false
if executed directly. - init_
global_ πregistry Starts the worker threads (if that has not already happened) with the given builder. - main_
loop π β//////////////////////////////////////////////////////////////////////// - set_
global_ πregistry Starts the worker threads (if that has not already happened) by creating a registry with the given callback.