document effect of join on memory ordering

This commit is contained in:
Ralf Jung 2018-08-15 15:22:54 +02:00
parent 81cfaad030
commit 34b65db842

View file

@ -1308,13 +1308,17 @@ impl<T> JoinHandle<T> {
&self.0.thread
}
/// Waits for the associated thread to finish.
/// 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
///