@@ -159,8 +159,9 @@ impl<T> OnceLock<T> {
159
159
160
160
/// Gets the mutable reference to the underlying value.
161
161
///
162
- /// Returns `None` if the cell is uninitialized, or being initialized.
163
- /// This method never blocks.
162
+ /// Returns `None` if the cell is uninitialized.
163
+ /// This method never blocks. Synchronization is guaranteed by requiring
164
+ /// a mutable reference.
164
165
#[ inline]
165
166
#[ stable( feature = "once_cell" , since = "1.70.0" ) ]
166
167
pub fn get_mut ( & mut self ) -> Option < & mut T > {
@@ -315,7 +316,7 @@ impl<T> OnceLock<T> {
315
316
/// Gets the mutable reference of the contents of the cell, initializing
316
317
/// it to `f()` if the cell was uninitialized.
317
318
///
318
- /// This method never blocks.
319
+ /// This method never blocks. Synchronization is guaranteed by requiring a mutable reference.
319
320
///
320
321
/// # Panics
321
322
///
@@ -405,7 +406,8 @@ impl<T> OnceLock<T> {
405
406
/// it to `f()` if the cell was uninitialized. If the cell was uninitialized
406
407
/// and `f()` failed, an error is returned.
407
408
///
408
- /// This method never blocks.
409
+ /// This method never blocks. Synchronization is guaranteed by requiring a mutable reference.
410
+
409
411
///
410
412
/// # Panics
411
413
///
@@ -469,7 +471,7 @@ impl<T> OnceLock<T> {
469
471
///
470
472
/// Has no effect and returns `None` if the `OnceLock` was uninitialized.
471
473
///
472
- /// Safety is guaranteed by requiring a mutable reference.
474
+ /// Synchronization is guaranteed by requiring a mutable reference.
473
475
///
474
476
/// # Examples
475
477
///
0 commit comments