]> git.lizzy.rs Git - rust.git/commitdiff
std: Deprecate the `scoped` feature
authorAlex Crichton <alex@alexcrichton.com>
Thu, 11 Jun 2015 02:04:51 +0000 (19:04 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 17 Jun 2015 16:07:17 +0000 (09:07 -0700)
The `thread::scoped` function will never be stabilized as-is and the API will
likely change significantly if it does, so this function is deprecated for
removal.

src/libstd/thread/mod.rs

index 153b04360877b36546e62ffbf6b5220f9379717d..da9cde8e3cd34947c7d08c49302505c43fc82902 100644 (file)
@@ -297,6 +297,9 @@ pub fn spawn<F, T>(self, f: F) -> io::Result<JoinHandle<T>> where
     /// the OS level.
     #[unstable(feature = "scoped",
                reason = "memory unsafe if destructor is avoided, see #24292")]
+    #[deprecated(since = "1.2.0",
+                 reason = "this unsafe API is unlikely to ever be stabilized \
+                           in this form")]
     pub fn scoped<'a, T, F>(self, f: F) -> io::Result<JoinGuard<'a, T>> where
         T: Send + 'a, F: FnOnce() -> T, F: Send + 'a
     {
@@ -398,6 +401,9 @@ pub fn spawn<F, T>(f: F) -> JoinHandle<T> where
 /// to recover from such errors.
 #[unstable(feature = "scoped",
            reason = "memory unsafe if destructor is avoided, see #24292")]
+#[deprecated(since = "1.2.0",
+             reason = "this unsafe API is unlikely to ever be stabilized \
+                       in this form")]
 pub fn scoped<'a, T, F>(f: F) -> JoinGuard<'a, T> where
     T: Send + 'a, F: FnOnce() -> T, F: Send + 'a
 {