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, 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.