mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
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.
This commit is contained in:
parent
04f7eba909
commit
d645f8fc28
@ -297,6 +297,9 @@ impl Builder {
|
||||
/// 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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user