about summary refs log tree commit diff
path: root/src/libstd/sync
diff options
context:
space:
mode:
authorGabriel Majeri <gabriel.majeri6@gmail.com>2018-09-28 10:59:45 +0300
committerGabriel Majeri <gabriel.majeri6@gmail.com>2018-09-28 12:03:40 +0300
commit7e921aa59090096593cb4fa202041c91a5d1e36b (patch)
tree02244f32aca019369fc4b2f6ad0af0aec9db50fe /src/libstd/sync
parentbcec6bb525032b48d8d1793854f61892c21fe8af (diff)
downloadrust-7e921aa59090096593cb4fa202041c91a5d1e36b.tar.gz
rust-7e921aa59090096593cb4fa202041c91a5d1e36b.zip
Rewrite section on concurrency
Diffstat (limited to 'src/libstd/sync')
-rw-r--r--src/libstd/sync/mod.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libstd/sync/mod.rs b/src/libstd/sync/mod.rs
index 5ba569bf7ce..edbed430e38 100644
--- a/src/libstd/sync/mod.rs
+++ b/src/libstd/sync/mod.rs
@@ -57,16 +57,17 @@
 //! as the final optimized code, when executed, produces the same results as the one
 //! without optimizations.
 //!
-//! When multiprocessing is involved (either multiple CPU cores, or multiple
-//! physical CPUs), access to global variables (which are shared between threads)
-//! could lead to nondeterministic results, **even if** compiler optimizations
-//! are disabled.
+//! Due to the [concurrency] involved in modern computers, assumptions about
+//! the program's execution order are often wrong. Access to global variables
+//! can lead to nondeterministic results, **even if** compiler optimizations
+//! are disabled, and it is **still possible** to introduce synchronization bugs.
 //!
 //! Note that thanks to Rust's safety guarantees, accessing global (static)
 //! variables requires `unsafe` code, assuming we don't use any of the
 //! synchronization primitives in this module.
 //!
 //! [constant folding]: https://en.wikipedia.org/wiki/Constant_folding
+//! [concurrency]: https://en.wikipedia.org/wiki/Concurrency_(computer_science)
 //!
 //! ## Out-of-order execution
 //!