about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2018-08-30 20:15:27 +0200
committerGitHub <noreply@github.com>2018-08-30 20:15:27 +0200
commit0c8b8e8b4232796598d36a02388e48a0c1c3a622 (patch)
tree693e901ac0523402bd843a6d980943223c5335e3
parent8505270077e53629d2dc9471b7559008c1f87857 (diff)
parent31b63d0ca8b117217c1612826a7ce2786b509c6c (diff)
downloadrust-0c8b8e8b4232796598d36a02388e48a0c1c3a622.tar.gz
rust-0c8b8e8b4232796598d36a02388e48a0c1c3a622.zip
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
-rw-r--r--src/libstd/thread/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 61c6084a250..a7c7dbb1b40 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -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
     ///