Module registry

Source

StructsΒ§

CustomSpawn
Spawns a thread with a user’s custom callback.
DefaultSpawn
Spawns a thread in the β€œnormal” way with std::thread::Builder.
Registry
RegistryId πŸ”’
Terminator πŸ”’
ThreadBuilder
Thread builder used for customization via ThreadPoolBuilder::spawn_handler.
ThreadInfo πŸ”’
WorkerThread πŸ”’
//////////////////////////////////////////////////////////////////////// WorkerThread identifiers
XorShift64Star πŸ”’
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Β§

ThreadSpawn
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, execute op in the default thread-pool. Either way, block until op completes and return its return value. If op panics, that panic will be propagated as well. The second argument indicates true 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 πŸ”’ ⚠
////////////////////////////////////////////////////////////////////////
mark_blocked
Mark a Rayon worker thread as blocked. This triggers the deadlock handler if no other worker thread is active
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.