Documentation updates to better share the purpose of OnceCell/OnceLock
This commit is contained in:
committed by
Trevor Gross
parent
dc4ba57566
commit
d1b28b75d2
@@ -133,7 +133,9 @@
|
||||
//! - [`Mutex`]: Mutual Exclusion mechanism, which ensures that at
|
||||
//! most one thread at a time is able to access some data.
|
||||
//!
|
||||
//! - [`Once`]: Used for thread-safe, one-time initialization of a
|
||||
//! - [`Once`]: Used for a thread-safe, one-time global initialization routine
|
||||
//!
|
||||
//! - [`OnceLock`]: Used for thread-safe, one-time initialization of a
|
||||
//! global variable.
|
||||
//!
|
||||
//! - [`RwLock`]: Provides a mutual exclusion mechanism which allows
|
||||
@@ -147,6 +149,7 @@
|
||||
//! [`mpsc`]: crate::sync::mpsc
|
||||
//! [`Mutex`]: crate::sync::Mutex
|
||||
//! [`Once`]: crate::sync::Once
|
||||
//! [`OnceLock`]: crate::sync::OnceLock
|
||||
//! [`RwLock`]: crate::sync::RwLock
|
||||
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
|
||||
Reference in New Issue
Block a user