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:
Pietro Albini 2018-08-30 20:15:27 +02:00 committed by GitHub
commit 0c8b8e8b42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
///