about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-05-09 18:40:19 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-05-09 18:40:19 +0530
commitac478ecb504a9731268798a95e787a1434bc769c (patch)
tree416b392ea08164f7d5be328c8363f5223b003209 /src/libcore
parent3906edf41e8faa0610daea954ffbda39841fbc0d (diff)
parent9b91ccffb0f72d78b208a495d8d0ffdcb630dff8 (diff)
downloadrust-ac478ecb504a9731268798a95e787a1434bc769c.tar.gz
rust-ac478ecb504a9731268798a95e787a1434bc769c.zip
Rollup merge of #25216 - barosl:no-more-task, r=Manishearth
I've found that there are still huge amounts of occurrences of `task`s in the documentation. This PR tries to eliminate all of them in favor of `thread`.
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/atomic.rs10
-rw-r--r--src/libcore/cell.rs5
-rw-r--r--src/libcore/macros.rs2
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 {
     () => (