diff options
| author | bors <bors@rust-lang.org> | 2015-05-09 13:10:43 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-05-09 13:10:43 +0000 |
| commit | 497942332f919b1a952310a730349ca1b9524968 (patch) | |
| tree | 08d010750e4e09312bddfef9485be7717fd75424 /src/libcore | |
| parent | 3906edf41e8faa0610daea954ffbda39841fbc0d (diff) | |
| parent | 511a8d47ebc9791e9b564807a370e59b0a83f13c (diff) | |
Auto merge of #25243 - Manishearth:rollup, r=Manishearth
- Successful merges: #25216, #25227 - Failed merges:
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/atomic.rs | 10 | ||||
| -rw-r--r-- | src/libcore/cell.rs | 5 | ||||
| -rw-r--r-- | src/libcore/macros.rs | 2 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/libcore/atomic.rs b/src/libcore/atomic.rs index bcbf31617ee..ec693f36691 100644 --- a/src/libcore/atomic.rs +++ b/src/libcore/atomic.rs @@ -52,20 +52,20 @@ //! spinlock_clone.store(0, Ordering::SeqCst); //! }); //! -//! // Wait for the other task to release the lock +//! // Wait for the other thread to release the lock //! while spinlock.load(Ordering::SeqCst) != 0 {} //! } //! ``` //! -//! Keep a global count of live tasks: +//! Keep a global count of live threads: //! //! ``` //! use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT}; //! -//! static GLOBAL_TASK_COUNT: AtomicUsize = ATOMIC_USIZE_INIT; +//! static GLOBAL_THREAD_COUNT: AtomicUsize = ATOMIC_USIZE_INIT; //! -//! let old_task_count = GLOBAL_TASK_COUNT.fetch_add(1, Ordering::SeqCst); -//! println!("live tasks: {}", old_task_count + 1); +//! let old_thread_count = GLOBAL_THREAD_COUNT.fetch_add(1, Ordering::SeqCst); +//! println!("live threads: {}", old_thread_count + 1); //! ``` #![stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index c717b608a24..2412bdc220e 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -24,7 +24,8 @@ //! claim temporary, exclusive, mutable access to the inner value. Borrows for `RefCell<T>`s are //! tracked 'at runtime', unlike Rust's native reference types which are entirely tracked //! statically, at compile time. Because `RefCell<T>` borrows are dynamic it is possible to attempt -//! to borrow a value that is already mutably borrowed; when this happens it results in task panic. +//! to borrow a value that is already mutably borrowed; when this happens it results in thread +//! panic. //! //! # When to choose interior mutability //! @@ -100,7 +101,7 @@ //! // Recursive call to return the just-cached value. //! // Note that if we had not let the previous borrow //! // of the cache fall out of scope then the subsequent -//! // recursive borrow would cause a dynamic task panic. +//! // recursive borrow would cause a dynamic thread panic. //! // This is the major hazard of using `RefCell`. //! self.minimum_spanning_tree() //! } diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs index ece419af951..54877c070cb 100644 --- a/src/libcore/macros.rs +++ b/src/libcore/macros.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -/// Entry point of task panic, for details, see std::macros +/// Entry point of thread panic, for details, see std::macros #[macro_export] macro_rules! panic { () => ( |
