Rollup merge of #95130 - workingjubilee:stably-finished, r=m-ou-se

Stabilize thread::is_finished

Closes #90470.

r? `@m-ou-se`
This commit is contained in:
Dylan DPC 2022-03-31 04:57:25 +02:00 committed by GitHub
commit 32c5a57a00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -1471,7 +1471,7 @@ impl<T> JoinHandle<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
}

View File

@ -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].
#[unstable(feature = "thread_is_running", issue = "90470")]
pub fn is_finished(&self) -> bool {
Arc::strong_count(&self.0.packet) == 1
}