From f9e049afc544e70dc595df67d878b52c098aaa9a Mon Sep 17 00:00:00 2001 From: Christian Poveda Date: Fri, 23 Feb 2018 12:57:18 -0500 Subject: [PATCH] add info about sync --- src/libcore/cell.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index 75ed562ae540..1067b6ff0c11 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -22,7 +22,9 @@ //! //! Shareable mutable containers exist to permit mutability in presence of aliasing in a //! controlled manner. Both `Cell` and `RefCell` allows to do this in a single threaded -//! way. For multiple threads is possible to use `Mutex`, `RwLock` or `AtomicXXX`. +//! way, you can mutate them using an inmutable reference. However, neither `Cell` nor +//! `RefCell` are thread safe (they do not implement `Sync`), if you need to do Aliasing and +//! Mutation between multiple threads is possible to use `Mutex`, `RwLock` or `AtomicXXX`. //! //! Values of the `Cell` and `RefCell` types may be mutated through shared references (i.e. //! the common `&T` type), whereas most Rust types can only be mutated through unique (`&mut T`)