Expand description
Locks for crate::thread’s cooperative threads, shaped like std::sync:
Mutex, Condvar, Semaphore. A wait lets the other threads run; time
is the frame’s. Without the threaded loop there is only the calling thread: locks
always succeed, waits with a timeout time out at once, waits without one trap
(nothing else could ever wake them).
Structs§
- Condvar
- A condition variable: wait for a change another thread makes under a
Mutex. - Mutex
- A mutual exclusion lock (not recursive: locking it again from the same thread is a deadlock).
- Mutex
Guard - Holds a
Mutex; unlocks it when dropped. - Semaphore
- A counting semaphore.
- Wait
Timeout Result - Whether a timed wait returned because the time ran out.