Skip to content

Commit 0169abd

Browse files
committed
sync: Remove Freeze / NoFreeze
1 parent 392348f commit 0169abd

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

src/libsync/arc.rs

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ struct MutexArcInner<T> { lock: Mutex, failed: bool, data: T }
162162
/// An Arc with mutable data protected by a blocking mutex.
163163
pub struct MutexArc<T> {
164164
priv x: UnsafeArc<MutexArcInner<T>>,
165-
priv marker: marker::NoFreeze,
166165
}
167166

168167
impl<T:Send> Clone for MutexArc<T> {
@@ -171,8 +170,7 @@ impl<T:Send> Clone for MutexArc<T> {
171170
fn clone(&self) -> MutexArc<T> {
172171
// NB: Cloning the underlying mutex is not necessary. Its reference
173172
// count would be exactly the same as the shared state's.
174-
MutexArc { x: self.x.clone(),
175-
marker: marker::NoFreeze, }
173+
MutexArc { x: self.x.clone() }
176174
}
177175
}
178176

@@ -191,8 +189,7 @@ impl<T:Send> MutexArc<T> {
191189
lock: Mutex::new_with_condvars(num_condvars),
192190
failed: false, data: user_data
193191
};
194-
MutexArc { x: UnsafeArc::new(data),
195-
marker: marker::NoFreeze, }
192+
MutexArc { x: UnsafeArc::new(data) }
196193
}
197194

198195
/**
@@ -297,17 +294,17 @@ struct RWArcInner<T> { lock: RWLock, failed: bool, data: T }
297294
*/
298295
pub struct RWArc<T> {
299296
priv x: UnsafeArc<RWArcInner<T>>,
300-
priv marker: marker::NoFreeze,
301-
priv marker1: marker::NoShare,
297+
priv marker: marker::NoShare,
302298
}
303299

304300
impl<T: Share + Send> Clone for RWArc<T> {
305301
/// Duplicate a rwlock-protected Arc. See arc::clone for more details.
306302
#[inline]
307303
fn clone(&self) -> RWArc<T> {
308-
RWArc { x: self.x.clone(),
309-
marker: marker::NoFreeze,
310-
marker1: marker::NoShare, }
304+
RWArc {
305+
x: self.x.clone(),
306+
marker: marker::NoShare
307+
}
311308
}
312309

313310
}
@@ -327,9 +324,10 @@ impl<T: Share + Send> RWArc<T> {
327324
lock: RWLock::new_with_condvars(num_condvars),
328325
failed: false, data: user_data
329326
};
330-
RWArc { x: UnsafeArc::new(data),
331-
marker: marker::NoFreeze,
332-
marker1: marker::NoShare, }
327+
RWArc {
328+
x: UnsafeArc::new(data),
329+
marker: marker::NoShare
330+
}
333331
}
334332

335333
/**

0 commit comments

Comments
 (0)