From 0169abd91db39144d5a53acaa04fe7c0e6d92fa6 Mon Sep 17 00:00:00 2001 From: Flavio Percoco Date: Fri, 21 Mar 2014 23:48:06 +0100 Subject: [PATCH] sync: Remove Freeze / NoFreeze --- src/libsync/arc.rs | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/libsync/arc.rs b/src/libsync/arc.rs index 0659e79433a..57187e27323 100644 --- a/src/libsync/arc.rs +++ b/src/libsync/arc.rs @@ -162,7 +162,6 @@ struct MutexArcInner { lock: Mutex, failed: bool, data: T } /// An Arc with mutable data protected by a blocking mutex. pub struct MutexArc { priv x: UnsafeArc>, - priv marker: marker::NoFreeze, } impl Clone for MutexArc { @@ -171,8 +170,7 @@ impl Clone for MutexArc { fn clone(&self) -> MutexArc { // NB: Cloning the underlying mutex is not necessary. Its reference // count would be exactly the same as the shared state's. - MutexArc { x: self.x.clone(), - marker: marker::NoFreeze, } + MutexArc { x: self.x.clone() } } } @@ -191,8 +189,7 @@ impl MutexArc { lock: Mutex::new_with_condvars(num_condvars), failed: false, data: user_data }; - MutexArc { x: UnsafeArc::new(data), - marker: marker::NoFreeze, } + MutexArc { x: UnsafeArc::new(data) } } /** @@ -297,17 +294,17 @@ struct RWArcInner { lock: RWLock, failed: bool, data: T } */ pub struct RWArc { priv x: UnsafeArc>, - priv marker: marker::NoFreeze, - priv marker1: marker::NoShare, + priv marker: marker::NoShare, } impl Clone for RWArc { /// Duplicate a rwlock-protected Arc. See arc::clone for more details. #[inline] fn clone(&self) -> RWArc { - RWArc { x: self.x.clone(), - marker: marker::NoFreeze, - marker1: marker::NoShare, } + RWArc { + x: self.x.clone(), + marker: marker::NoShare + } } } @@ -327,9 +324,10 @@ impl RWArc { lock: RWLock::new_with_condvars(num_condvars), failed: false, data: user_data }; - RWArc { x: UnsafeArc::new(data), - marker: marker::NoFreeze, - marker1: marker::NoShare, } + RWArc { + x: UnsafeArc::new(data), + marker: marker::NoShare + } } /**