]> git.lizzy.rs Git - rust.git/commitdiff
Stabilize Condvar::wait_until and wait_timeout_until
authorMatt Brubeck <mattbrubeck@fullstory.com>
Fri, 6 Dec 2019 02:58:56 +0000 (18:58 -0800)
committerMatt Brubeck <mbrubeck@limpet.net>
Thu, 26 Dec 2019 22:15:05 +0000 (14:15 -0800)
src/libstd/sync/condvar.rs

index 5a4cb14b72d6200bb8aee6dd2687249088f39100..62bf0125c369290d134bf129e9e8553279059dd5 100644 (file)
@@ -228,8 +228,6 @@ pub fn wait<'a, T>(&self, guard: MutexGuard<'a, T>) -> LockResult<MutexGuard<'a,
     /// # Examples
     ///
     /// ```
-    /// #![feature(wait_until)]
-    ///
     /// use std::sync::{Arc, Mutex, Condvar};
     /// use std::thread;
     ///
@@ -249,7 +247,7 @@ pub fn wait<'a, T>(&self, guard: MutexGuard<'a, T>) -> LockResult<MutexGuard<'a,
     /// // As long as the value inside the `Mutex<bool>` is `false`, we wait.
     /// let _guard = cvar.wait_until(lock.lock().unwrap(), |started| { *started }).unwrap();
     /// ```
-    #[unstable(feature = "wait_until", issue = "47960")]
+    #[stable(feature = "wait_until", since = "1.42.0")]
     pub fn wait_until<'a, T, F>(
         &self,
         mut guard: MutexGuard<'a, T>,
@@ -433,8 +431,6 @@ pub fn wait_timeout<'a, T>(
     /// # Examples
     ///
     /// ```
-    /// #![feature(wait_timeout_until)]
-    ///
     /// use std::sync::{Arc, Mutex, Condvar};
     /// use std::thread;
     /// use std::time::Duration;
@@ -462,7 +458,7 @@ pub fn wait_timeout<'a, T>(
     /// }
     /// // access the locked mutex via result.0
     /// ```
-    #[unstable(feature = "wait_timeout_until", issue = "47960")]
+    #[stable(feature = "wait_timeout_until", since = "1.42.0")]
     pub fn wait_timeout_until<'a, T, F>(
         &self,
         mut guard: MutexGuard<'a, T>,
@@ -613,7 +609,6 @@ fn drop(&mut self) {
 #[cfg(test)]
 mod tests {
     use crate::sync::atomic::{AtomicBool, Ordering};
-    /// #![feature(wait_until)]
     use crate::sync::mpsc::channel;
     use crate::sync::{Arc, Condvar, Mutex};
     use crate::thread;