Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions library/std/src/thread/join_handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ impl<T> JoinHandle<T> {
/// Waits for the associated thread to finish.
///
/// This function will return immediately if the associated thread has already finished.
/// Otherwise, it fully waits for the thread to finish, including all destructors
/// for thread-local variables that might be running after the main function of the thread.
///
/// In terms of [atomic memory orderings], the completion of the associated
/// thread synchronizes with this function returning. In other words, all
Expand Down
5 changes: 5 additions & 0 deletions library/std/src/thread/scoped.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ impl ScopeData {
///
/// All threads spawned within the scope that haven't been manually joined
/// will be automatically joined before this function returns.
/// However, note that joining will only wait for the main function of these threads to finish; even
/// when this function returns, destructors of thread-local variables in these threads might still
/// be running.
///
/// # Panics
///
Expand Down Expand Up @@ -292,6 +295,8 @@ impl<'scope, T> ScopedJoinHandle<'scope, T> {
/// Waits for the associated thread to finish.
///
/// This function will return immediately if the associated thread has already finished.
/// Otherwise, it fully waits for the thread to finish, including all destructors
/// for thread-local variables that might be running after the main function of the thread.
///
/// In terms of [atomic memory orderings], the completion of the associated
/// thread synchronizes with this function returning.
Expand Down
Loading