std::sync

This module provides thread synchronization functions.

This is covered in Chapter 11Concurrency in Rust.

Structs, Traits, and Enums

  • StructsArc (atomic ref counted wrapper), Barrier (enables multiple threads to synchronize the beginning of some computation), BarrierWaitResult (result from a thread wait), Condvar (CONDitional VARiable), Mutex (mutual exclusion primitive), MutexGuard (scoped lock mutex; becomes unlocked when the structure goes out of scope), Once (sync primitive used to run a one-time global initialization), PoisonError (error that can be returned when a lock is required), RwLock (read/write lock), RWLockReadGuard (used to release shared read access to a lock when dropped), RWWriteGuard (used to release shared write access if a lock when dropped), WaitTimeoutResult (type used to determine whether a condition variable timed out or not), and Weak (weak pointer to Arc).
  • EnumTryLockError (errors that may occur when calling try_lock).
See the code examples in Chapter 11Concurrency in Rust.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset