@@ -331,14 +331,14 @@ impl Once {
331
331
/// * `call_once` was called, but has not yet completed,
332
332
/// * the `Once` instance is poisoned
333
333
///
334
- /// It is also possible that immediately after `is_completed`
335
- /// returns false, some other thread finishes executing
336
- /// `call_once`.
334
+ /// This function returning `false` does not mean that `Once` has not been
335
+ /// executed. For example, it may have been executed in the time between
336
+ /// when `is_completed` starts executing and when it returns, in which case
337
+ /// the `false` return value would be stale (but still permissible).
337
338
///
338
339
/// # Examples
339
340
///
340
341
/// ```
341
- /// #![feature(once_is_completed)]
342
342
/// use std::sync::Once;
343
343
///
344
344
/// static INIT: Once = Once::new();
@@ -351,7 +351,6 @@ impl Once {
351
351
/// ```
352
352
///
353
353
/// ```
354
- /// #![feature(once_is_completed)]
355
354
/// use std::sync::Once;
356
355
/// use std::thread;
357
356
///
@@ -364,7 +363,7 @@ impl Once {
364
363
/// assert!(handle.join().is_err());
365
364
/// assert_eq!(INIT.is_completed(), false);
366
365
/// ```
367
- #[ unstable ( feature = "once_is_completed" , issue = "54890 " ) ]
366
+ #[ stable ( feature = "once_is_completed" , since = "1.44.0 " ) ]
368
367
#[ inline]
369
368
pub fn is_completed ( & self ) -> bool {
370
369
// An `Acquire` load is enough because that makes all the initialization
0 commit comments