Structs§
- Duration
- A
Durationtype to represent a span of time, typically used for system timeouts.
Functions§
- active_
named_ thread_ count - Returns the number of currently active threads spawned via
spawn_named. - assert_
main_ thread - Panic if called from a non-main thread on wasm32.
- assert_
not_ main_ thread - Panic if called from the wasm main thread.
- available_
parallelism - Returns the number of hardware threads available.
- current
- Get a handle to the current thread.
- current_
thread_ id - Hash of the current thread’s ID, usable for shard indexing.
- is_
main_ thread - Returns
trueon native targets. - is_
worker_ thread - Returns
falseon native targets. - park
- Block until the current thread is explicitly unparked.
- park_
timeout - Block until unparked or until
durationelapses. - sleep
- Block the current thread for at least
duration. - spawn
- Spawn a new thread.
- spawn_
named - Spawn a new named thread.
- yield_
now