about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-12-21 00:12:56 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-12-21 13:49:04 -0800
commitfb7c08876e7b29c1b9d57df905f3ee0deec46aa1 (patch)
tree2b7eb92a4d5a0d997871020964fe539390737dd3 /src/liballoc
parentdbeef0edb2d25a3ff321d8e09532f053b5ef2c07 (diff)
downloadrust-fb7c08876e7b29c1b9d57df905f3ee0deec46aa1.tar.gz
rust-fb7c08876e7b29c1b9d57df905f3ee0deec46aa1.zip
Test fixes and rebase conflicts
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/arc.rs15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs
index 271cab393c4..893c9d250b7 100644
--- a/src/liballoc/arc.rs
+++ b/src/liballoc/arc.rs
@@ -33,36 +33,37 @@
 //!
 //! ```
 //! use std::sync::Arc;
+//! use std::thread::Thread;
 //!
 //! let five = Arc::new(5i);
 //!
 //! for i in range(0u, 10) {
 //!     let five = five.clone();
 //!
-//!     spawn(move || {
+//!     Thread::spawn(move || {
 //!         println!("{}", five);
-//!     });
+//!     }).detach();
 //! }
 //! ```
 //!
 //! Sharing mutable data safely between tasks with a `Mutex`:
 //!
 //! ```
-//! use std::sync::Arc;
-//! use std::sync::Mutex;
+//! use std::sync::{Arc, Mutex};
+//! use std::thread::Thread;
 //!
 //! let five = Arc::new(Mutex::new(5i));
 //!
 //! for _ in range(0u, 10) {
 //!     let five = five.clone();
 //!
-//!     spawn(move || {
+//!     Thread::spawn(move || {
 //!         let mut number = five.lock();
 //!
-//!         number += 1;
+//!         *number += 1;
 //!
 //!         println!("{}", *number); // prints 6
-//!     });
+//!     }).detach();
 //! }
 //! ```