We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 787a1f7 commit 0607642Copy full SHA for 0607642
std/src/sync/once_lock.rs
@@ -281,9 +281,7 @@ impl<T> OnceLock<T> {
281
/// Gets the mutable reference of the contents of the cell, initializing
282
/// it with `f` if the cell was empty.
283
///
284
- /// Many threads may call `get_mut_or_init` concurrently with different
285
- /// initializing functions, but it is guaranteed that only one function
286
- /// will be executed.
+ /// This method never blocks.
287
288
/// # Panics
289
@@ -373,6 +371,8 @@ impl<T> OnceLock<T> {
373
371
/// it with `f` if the cell was empty. If the cell was empty and `f` failed,
374
372
/// an error is returned.
375
+ ///
376
377
378
/// If `f` panics, the panic is propagated to the caller, and
0 commit comments