From efd2a1780b2ee1909e84df0c3b398adb024ee375 Mon Sep 17 00:00:00 2001 From: Aaron Turon Date: Mon, 16 Feb 2015 16:33:55 -0800 Subject: Deprecate std::sync::TaskPool Rather than stabilize on the current API, we're going to punt this concern to crates.io, to allow for faster iteration. If you need this functionality, you might look at https://github.com/carllerche/syncbox [breaking-change] --- src/libstd/sync/task_pool.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libstd/sync/task_pool.rs') diff --git a/src/libstd/sync/task_pool.rs b/src/libstd/sync/task_pool.rs index 684a46fd6ff..2bc51e340c0 100644 --- a/src/libstd/sync/task_pool.rs +++ b/src/libstd/sync/task_pool.rs @@ -10,11 +10,11 @@ //! Abstraction of a thread pool for basic parallelism. -#![unstable(feature = "std_misc", - reason = "the semantics of a failing task and whether a thread is \ - re-attached to a thread pool are somewhat unclear, and the \ - utility of this type in `std::sync` is questionable with \ - respect to the jobs of other primitives")] +#![deprecated(since = "1.0.0", + reason = "This kind of API needs some time to bake in \ + crates.io. Consider trying \ + https://github.com/carllerche/syncbox")] +#![unstable(feature = "std_misc")] use core::prelude::*; -- cgit 1.4.1-3-g733a5 From 27f8708ba4aac3f4f2d3074b7b4a451774b1a813 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 24 Feb 2015 14:24:15 -0800 Subject: std: Recomend threadpool on crates.io for TaskPool --- src/libstd/sync/task_pool.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstd/sync/task_pool.rs') diff --git a/src/libstd/sync/task_pool.rs b/src/libstd/sync/task_pool.rs index 2bc51e340c0..83e4c6c2e3b 100644 --- a/src/libstd/sync/task_pool.rs +++ b/src/libstd/sync/task_pool.rs @@ -12,8 +12,8 @@ #![deprecated(since = "1.0.0", reason = "This kind of API needs some time to bake in \ - crates.io. Consider trying \ - https://github.com/carllerche/syncbox")] + crates.io. This functionality is available through \ + https://crates.io/crates/threadpool")] #![unstable(feature = "std_misc")] use core::prelude::*; -- cgit 1.4.1-3-g733a5 From f8e4fcb38c2ab0b5180c8fff35ad0454eb0667d7 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Wed, 25 Feb 2015 11:45:06 +0530 Subject: allow(deprecated) for TaskPool (fixup #22783) --- src/libstd/sync/mod.rs | 1 + src/libstd/sync/task_pool.rs | 2 ++ 2 files changed, 3 insertions(+) (limited to 'src/libstd/sync/task_pool.rs') diff --git a/src/libstd/sync/mod.rs b/src/libstd/sync/mod.rs index f3b721438d8..68137601c40 100644 --- a/src/libstd/sync/mod.rs +++ b/src/libstd/sync/mod.rs @@ -31,6 +31,7 @@ pub use self::barrier::{Barrier, BarrierWaitResult}; pub use self::poison::{PoisonError, TryLockError, TryLockResult, LockResult}; pub use self::future::Future; +#[allow(deprecated)] pub use self::task_pool::TaskPool; pub mod mpsc; diff --git a/src/libstd/sync/task_pool.rs b/src/libstd/sync/task_pool.rs index e01f8145283..efb6689e785 100644 --- a/src/libstd/sync/task_pool.rs +++ b/src/libstd/sync/task_pool.rs @@ -16,6 +16,8 @@ https://crates.io/crates/threadpool")] #![unstable(feature = "std_misc")] +#![allow(deprecated)] + use core::prelude::*; use sync::{Arc, Mutex}; -- cgit 1.4.1-3-g733a5