@@ -1885,11 +1885,16 @@ impl<T> JoinHandle<T> {
1885
1885
/// Returns a [`Future`] that resolves when the thread has finished.
1886
1886
///
1887
1887
/// Its [output](Future::Output) value is identical to that of [`JoinHandle::join()`];
1888
- /// this is the `async` equivalent of that blocking function.
1888
+ /// this is the approximate `async` equivalent of that blocking function.
1889
1889
///
1890
- /// If the returned future is dropped (cancelled), the thread will become *detached*;
1891
- /// there will be no way to observe or wait for the thread’s termination.
1892
- /// This is identical to the behavior of `JoinHandle` itself.
1890
+ /// # Details
1891
+ ///
1892
+ /// * If the returned future is dropped (cancelled), the thread will become *detached*;
1893
+ /// there will be no way to observe or wait for the thread’s termination.
1894
+ /// This is identical to the behavior of `JoinHandle` itself.
1895
+ ///
1896
+ /// * Unlike [`JoinHandle::join()`], the thread may still exist when the future resolves.
1897
+ /// In particular, it may still be executing destructors for thread-local values.
1893
1898
///
1894
1899
/// # Example
1895
1900
///
@@ -1970,9 +1975,15 @@ fn _assert_sync_and_send() {
1970
1975
/// Obtain it by calling [`JoinHandle::into_join_future()`] or
1971
1976
/// [`ScopedJoinHandle::into_join_future()`].
1972
1977
///
1973
- /// If a `JoinFuture` is dropped (cancelled), and the thread does not belong to a [scope],
1974
- /// the associated thread will become *detached*;
1975
- /// there will be no way to observe or wait for the thread’s termination.
1978
+ /// # Behavior details
1979
+ ///
1980
+ /// * If a `JoinFuture` is dropped (cancelled), and the thread does not belong to a [scope],
1981
+ /// the associated thread will become *detached*;
1982
+ /// there will be no way to observe or wait for the thread’s termination.
1983
+ ///
1984
+ /// * Unlike [`JoinHandle::join()`], the thread may still exist when the future resolves.
1985
+ /// In particular, it may still be executing destructors for thread-local values.
1986
+ ///
1976
1987
#[ unstable( feature = "thread_join_future" , issue = "none" ) ]
1977
1988
pub struct JoinFuture < ' scope , T > ( Option < JoinInner < ' scope , T > > ) ;
1978
1989
0 commit comments