Navigation Menu

Skip to content

Commit

Permalink
Explain that RefCell is single-threaded.
Browse files Browse the repository at this point in the history
Fixes #21469.
  • Loading branch information
steveklabnik committed Jan 21, 2015
1 parent 6869645 commit 973c2f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libcore/cell.rs
Expand Up @@ -74,6 +74,10 @@
//! }
//! ```
//!
//! Note that this example uses `Rc<T>` and not `Arc<T>`. `RefCell<T>`s are for single-threaded
//! scenarios. Consider using `Mutex<T>` if you need shared mutability in a multi-threaded
//! situation.
//!
//! ## Implementation details of logically-immutable methods
//!
//! Occasionally it may be desirable not to expose in an API that
Expand Down

0 comments on commit 973c2f6

Please sign in to comment.