Skip to content

Commit

Permalink
Differ LazyLock vs. OnceLock in std::sync overview
Browse files Browse the repository at this point in the history
  • Loading branch information
workingjubilee committed Jun 3, 2024
1 parent a198721 commit 7e47256
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion std/src/sync/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@
//! - [`Once`]: Used for a thread-safe, one-time global initialization routine
//!
//! - [`OnceLock`]: Used for thread-safe, one-time initialization of a
//! global variable.
//! variable, with potentially different initializers based on the caller.
//!
//! - [`LazyLock`]: Used for thread-safe, one-time initialization of a
//! variable, using one nullary initializer function provided at creation.
//!
//! - [`RwLock`]: Provides a mutual exclusion mechanism which allows
//! multiple readers at the same time, while allowing only one
Expand Down

0 comments on commit 7e47256

Please sign in to comment.