Expand description
Free functions.
Structs§
- Panic
Guard 🔒 - Used to ensure that
parkandpark_timeoutdo not unwind, as that can cause undefined behavior if not handled correctly (see #102398 for context).
Functions§
- available_
parallelism - Returns an estimate of the default amount of parallelism a program should use.
- panicking
- Determines whether the current thread is unwinding because of panic.
- park
- Blocks unless or until the current thread’s token is made available.
- park_
timeout - Blocks unless or until the current thread’s token is made available or the specified duration has been reached (may wake spuriously).
- park_
timeout_ ms Deprecated - Uses
park_timeout. - sleep
- Puts the current thread to sleep for at least the specified amount of time.
- sleep_
ms Deprecated - Uses
sleep. - spawn
- Spawns a new thread, returning a
JoinHandlefor it. - yield_
now - Cooperatively gives up a timeslice to the OS scheduler.
- sleep_
until Experimental - Puts the current thread to sleep until the specified deadline has passed.