Skip to content

Commit d645f8f

Browse files
committed
std: Deprecate the scoped feature
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.
1 parent 04f7eba commit d645f8f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/libstd/thread/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,9 @@ impl Builder {
297297
/// the OS level.
298298
#[unstable(feature = "scoped",
299299
reason = "memory unsafe if destructor is avoided, see #24292")]
300+
#[deprecated(since = "1.2.0",
301+
reason = "this unsafe API is unlikely to ever be stabilized \
302+
in this form")]
300303
pub fn scoped<'a, T, F>(self, f: F) -> io::Result<JoinGuard<'a, T>> where
301304
T: Send + 'a, F: FnOnce() -> T, F: Send + 'a
302305
{
@@ -398,6 +401,9 @@ pub fn spawn<F, T>(f: F) -> JoinHandle<T> where
398401
/// to recover from such errors.
399402
#[unstable(feature = "scoped",
400403
reason = "memory unsafe if destructor is avoided, see #24292")]
404+
#[deprecated(since = "1.2.0",
405+
reason = "this unsafe API is unlikely to ever be stabilized \
406+
in this form")]
401407
pub fn scoped<'a, T, F>(f: F) -> JoinGuard<'a, T> where
402408
T: Send + 'a, F: FnOnce() -> T, F: Send + 'a
403409
{

0 commit comments

Comments
 (0)