diff options
| author | Aaron Turon <aturon@mozilla.com> | 2014-12-06 18:34:37 -0800 |
|---|---|---|
| committer | Aaron Turon <aturon@mozilla.com> | 2014-12-18 23:31:51 -0800 |
| commit | 43ae4b3301cc0605839778ecf59effb32b752e33 (patch) | |
| tree | aa111f5adc1eaa1e996847e1437d1b1b40821ce0 /src/libstd/sync/mutex.rs | |
| parent | 14c1a103bc3f78721df1dc860a75a477c8275e3a (diff) | |
| download | rust-43ae4b3301cc0605839778ecf59effb32b752e33.tar.gz rust-43ae4b3301cc0605839778ecf59effb32b752e33.zip | |
Fallout from new thread API
Diffstat (limited to 'src/libstd/sync/mutex.rs')
| -rw-r--r-- | src/libstd/sync/mutex.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs index 33f8d254c71..fc73e2957a5 100644 --- a/src/libstd/sync/mutex.rs +++ b/src/libstd/sync/mutex.rs @@ -274,7 +274,7 @@ impl Drop for StaticMutexGuard { mod test { use prelude::*; - use task; + use thread::Thread; use sync::{Arc, Mutex, StaticMutex, MUTEX_INIT, Condvar}; #[test] @@ -386,10 +386,10 @@ mod test { fn test_mutex_arc_poison() { let arc = Arc::new(Mutex::new(1i)); let arc2 = arc.clone(); - let _ = task::try(move|| { + let _ = Thread::with_join(move|| { let lock = arc2.lock(); assert_eq!(*lock, 2); - }); + }).join(); let lock = arc.lock(); assert_eq!(*lock, 1); } @@ -414,7 +414,7 @@ mod test { fn test_mutex_arc_access_in_unwind() { let arc = Arc::new(Mutex::new(1i)); let arc2 = arc.clone(); - let _ = task::try(move|| -> () { + let _ = Thread::with_join::<()>(move|| -> () { struct Unwinder { i: Arc<Mutex<int>>, } @@ -425,7 +425,7 @@ mod test { } let _u = Unwinder { i: arc2 }; panic!(); - }); + }).join(); let lock = arc.lock(); assert_eq!(*lock, 2); } |
