Expand description
Shuttle’s implementation of std::thread
.
Structs§
- Access
Error - An error returned by
LocalKey::try_with
- Builder
- Thread factory, which can be used in order to configure the properties of a new thread.
- Join
Handle - An owned permission to join on a thread (block on its termination).
- Local
Key - A thread local storage key which owns its contents
- Scope
- A scope to spawn scoped threads in.
- Scoped
Join Handle - An owned permission to join on a scoped thread (block on its termination).
- Thread
- A handle to a thread.
- Thread
Id - A unique identifier for a running thread
Functions§
- current
- Get a handle to the thread that invokes it
- panicking
- Determines whether the current thread is unwinding because of panic.
- park
- Blocks unless or until the current thread’s token is made available (may wake spuriously).
- park_
timeout - Blocks unless or until the current thread’s token is made available or the specified duration has been reached (may wake spuriously).
- scope
- Creates a scope for spawning scoped threads.
- sleep
- Puts the current thread to sleep for at least the specified amount of time.
- spawn
- Spawn a new thread, returning a JoinHandle for it.
- yield_
now - Cooperatively gives up a timeslice to the Shuttle scheduler.