Rollup merge of #53389 - RalfJung:thread-join, r=sfackler
document effect of join on memory ordering Fixes https://github.com/rust-lang/rust/issues/45467
This commit is contained in:
commit
0c8b8e8b42
@ -1310,11 +1310,17 @@ impl<T> JoinHandle<T> {
|
||||
|
||||
/// Waits for the associated thread to finish.
|
||||
///
|
||||
/// In terms of [atomic memory orderings], the completion of the associated
|
||||
/// thread synchronizes with this function returning. In other words, all
|
||||
/// operations performed by that thread are ordered before all
|
||||
/// operations that happen after `join` returns.
|
||||
///
|
||||
/// If the child thread panics, [`Err`] is returned with the parameter given
|
||||
/// to [`panic`].
|
||||
///
|
||||
/// [`Err`]: ../../std/result/enum.Result.html#variant.Err
|
||||
/// [`panic`]: ../../std/macro.panic.html
|
||||
/// [atomic memory orderings]: ../../std/sync/atomic/index.html
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user