]> git.lizzy.rs Git - rust.git/commitdiff
document effect of join on memory ordering
authorRalf Jung <post@ralfj.de>
Wed, 15 Aug 2018 13:22:54 +0000 (15:22 +0200)
committerRalf Jung <post@ralfj.de>
Wed, 15 Aug 2018 13:22:54 +0000 (15:22 +0200)
src/libstd/thread/mod.rs

index 61c6084a25023897c4aa27fec6d6745cc4982e6c..b580b1ec510b7950aa88f33384a862799756d578 100644 (file)
@@ -1308,13 +1308,17 @@ pub fn thread(&self) -> &Thread {
         &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
     ///