Module polkadot_node_core_pvf_common::worker::thread
source · Expand description
Functionality related to threads spawned by the workers.
The motivation for this module is to coordinate worker threads without using async Rust.
Enums§
- Contains the outcome of waiting on threads, or
Pending
if none are ready.
Functions§
- Gets a condvar initialized to
Pending
. - Runs a worker thread. Will run the requested function, and afterwards notify the threads waiting on the condvar. Catches panics during execution and resumes the panics after triggering the condvar, so that the waiting thread is notified on panics.
- Runs a worker thread with the given stack size. See
spawn_worker_thread
. - Block the thread while it waits on the condvar.
- Block the thread while it waits on the condvar or on a timeout. If the timeout is hit, returns
None
.
Type Aliases§
- Helper type.