diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-02-17 15:19:18 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-02-17 17:27:44 -0800 |
| commit | d8450d69bbb7bb5c288fba01295551b78a5a8c03 (patch) | |
| tree | 180b2e9d64e822c78f8ad38c3eb7f1501c17862d /src/liballoc | |
| parent | c14cf4dc868a9468dcf0a106a84dcafd859707fc (diff) | |
| parent | d0de2b46e9bcca93971ef64d6ecdef872633f246 (diff) | |
| download | rust-d8450d69bbb7bb5c288fba01295551b78a5a8c03.tar.gz rust-d8450d69bbb7bb5c288fba01295551b78a5a8c03.zip | |
rollup merge of #22435: aturon/final-stab-thread
Conflicts: src/test/bench/rt-messaging-ping-pong.rs src/test/bench/rt-parfib.rs src/test/bench/task-perf-spawnalot.rs
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/arc.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs index 0617c604121..3830d7fe295 100644 --- a/src/liballoc/arc.rs +++ b/src/liballoc/arc.rs @@ -35,14 +35,14 @@ //! //! ``` //! use std::sync::Arc; -//! use std::thread::Thread; +//! use std::thread; //! //! let five = Arc::new(5); //! //! for _ in 0..10 { //! let five = five.clone(); //! -//! Thread::spawn(move || { +//! thread::spawn(move || { //! println!("{:?}", five); //! }); //! } @@ -52,14 +52,14 @@ //! //! ``` //! use std::sync::{Arc, Mutex}; -//! use std::thread::Thread; +//! use std::thread; //! //! let five = Arc::new(Mutex::new(5)); //! //! for _ in 0..10 { //! let five = five.clone(); //! -//! Thread::spawn(move || { +//! thread::spawn(move || { //! let mut number = five.lock().unwrap(); //! //! *number += 1; @@ -95,7 +95,7 @@ use heap::deallocate; /// /// ```rust /// use std::sync::Arc; -/// use std::thread::Thread; +/// use std::thread; /// /// fn main() { /// let numbers: Vec<_> = (0..100u32).map(|i| i as f32).collect(); @@ -104,7 +104,7 @@ use heap::deallocate; /// for _ in 0..10 { /// let child_numbers = shared_numbers.clone(); /// -/// Thread::spawn(move || { +/// thread::spawn(move || { /// let local_numbers = child_numbers.as_slice(); /// /// // Work with the local numbers @@ -621,7 +621,7 @@ mod tests { use std::option::Option::{Some, None}; use std::sync::atomic; use std::sync::atomic::Ordering::{Acquire, SeqCst}; - use std::thread::Thread; + use std::thread; use std::vec::Vec; use super::{Arc, Weak, weak_count, strong_count}; use std::sync::Mutex; @@ -648,7 +648,7 @@ mod tests { let (tx, rx) = channel(); - let _t = Thread::spawn(move || { + let _t = thread::spawn(move || { let arc_v: Arc<Vec<i32>> = rx.recv().unwrap(); assert_eq!((*arc_v)[3], 4); }); |
