Skip to content

Commit

Permalink
Rollup merge of rust-lang#53389 - RalfJung:thread-join, r=sfackler
Browse files Browse the repository at this point in the history
document effect of join on memory ordering

Fixes rust-lang#45467
  • Loading branch information
pietroalbini committed Aug 29, 2018
2 parents 644f8f1 + 31b63d0 commit aa9a2cc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/libstd/thread/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down

0 comments on commit aa9a2cc

Please sign in to comment.