Expand description
Thread utilities, including cooperative green threads.
Structs§
- Builder
- Thread factory, which can be used in order to configure the properties of a new thread.
- Join
Handle - Thread
- A handle to a thread.
- Thread
Id - A unique identifier for a running thread.
Functions§
- contribute⚠
- This is a non-standard function that should be called by a hardware or OS thread in order to drive spawned threads.
- current
- Gets a handle to the thread that invokes it.
- 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).
- sleep
- Puts the current thread to sleep for at least the specified amount of time.
- spawn
- Spawns a new thread, returning a
JoinHandlefor it. - yield_
now - Cooperatively gives up a timeslice to the scheduler.