From 5a25e228eb7df1f8d227460c577215e5c75794b2 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Sat, 19 Mar 2022 19:53:26 -0700 Subject: [PATCH 1/2] Stabilize thread::is_finished --- library/std/src/thread/mod.rs | 2 +- library/std/src/thread/scoped.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs index ae292caaed9..5309dc47ac4 100644 --- a/library/std/src/thread/mod.rs +++ b/library/std/src/thread/mod.rs @@ -1471,7 +1471,7 @@ impl JoinHandle { /// /// This function does not block. To block while waiting on the thread to finish, /// use [`join`][Self::join]. - #[unstable(feature = "thread_is_running", issue = "90470")] + #[stable(feature = "thread_is_running", since = "1.61.0")] pub fn is_finished(&self) -> bool { Arc::strong_count(&self.0.packet) == 1 } diff --git a/library/std/src/thread/scoped.rs b/library/std/src/thread/scoped.rs index 07e113f3b62..e3da79932c7 100644 --- a/library/std/src/thread/scoped.rs +++ b/library/std/src/thread/scoped.rs @@ -316,7 +316,7 @@ impl<'scope, T> ScopedJoinHandle<'scope, T> { /// /// This function does not block. To block while waiting on the thread to finish, /// use [`join`][Self::join]. - #[unstable(feature = "thread_is_running", issue = "90470")] + #[stable(feature = "thread_is_running", since = "1.61.0")] pub fn is_finished(&self) -> bool { Arc::strong_count(&self.0.packet) == 1 } From 25eb06077997bca0b20f0ef7d828672a8140519e Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Wed, 30 Mar 2022 13:59:27 +0200 Subject: [PATCH 2/2] Don't stabilize ScopedJoinHandle::is_finished yet. --- library/std/src/thread/scoped.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/library/std/src/thread/scoped.rs b/library/std/src/thread/scoped.rs index e3da79932c7..eeccc99b3a3 100644 --- a/library/std/src/thread/scoped.rs +++ b/library/std/src/thread/scoped.rs @@ -316,7 +316,6 @@ impl<'scope, T> ScopedJoinHandle<'scope, T> { /// /// This function does not block. To block while waiting on the thread to finish, /// use [`join`][Self::join]. - #[stable(feature = "thread_is_running", since = "1.61.0")] pub fn is_finished(&self) -> bool { Arc::strong_count(&self.0.packet) == 1 }