提交 16e07602 编写于 作者: F Flavio Percoco

std::comm: Remove Freeze / NoFreeze

上级 0169abd9
......@@ -291,7 +291,7 @@ pub struct Receiver<T> {
priv inner: Flavor<T>,
priv receives: Cell<uint>,
// can't share in an arc
priv marker: marker::NoFreeze,
priv marker: marker::NoShare,
}
/// An iterator over messages on a receiver, this iterator will block
......@@ -307,7 +307,7 @@ pub struct Sender<T> {
priv inner: Flavor<T>,
priv sends: Cell<uint>,
// can't share in an arc
priv marker: marker::NoFreeze,
priv marker: marker::NoShare,
}
/// This enumeration is the list of the possible reasons that try_recv could not
......@@ -340,7 +340,7 @@ pub fn channel<T: Send>() -> (Sender<T>, Receiver<T>) {
impl<T: Send> Sender<T> {
fn my_new(inner: Flavor<T>) -> Sender<T> {
Sender { inner: inner, sends: Cell::new(0), marker: marker::NoFreeze }
Sender { inner: inner, sends: Cell::new(0), marker: marker::NoShare }
}
/// Sends a value along this channel to be received by the corresponding
......@@ -478,7 +478,7 @@ fn drop(&mut self) {
impl<T: Send> Receiver<T> {
fn my_new(inner: Flavor<T>) -> Receiver<T> {
Receiver { inner: inner, receives: Cell::new(0), marker: marker::NoFreeze }
Receiver { inner: inner, receives: Cell::new(0), marker: marker::NoShare }
}
/// Blocks waiting for a value on this receiver
......
......@@ -66,7 +66,6 @@ pub struct Select {
priv tail: *mut Handle<'static, ()>,
priv next_id: Cell<uint>,
priv marker1: marker::NoSend,
priv marker2: marker::NoFreeze,
}
/// A handle to a receiver which is currently a member of a `Select` set of
......@@ -105,7 +104,6 @@ impl Select {
pub fn new() -> Select {
Select {
marker1: marker::NoSend,
marker2: marker::NoFreeze,
head: 0 as *mut Handle<'static, ()>,
tail: 0 as *mut Handle<'static, ()>,
next_id: Cell::new(1),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册