mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
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:
commit
32c5a57a00
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user