]> git.proxmox.com Git - rustc.git/blobdiff - src/libstd/sync/mpsc/mod.rs
Imported Upstream version 1.9.0+dfsg1
[rustc.git] / src / libstd / sync / mpsc / mod.rs
index fadca390986ceb3f7f5a87751a627cb64f9ac2f7..dbcc2bc95bc2147511f201a82960373ad591ef25 100644 (file)
@@ -299,6 +299,9 @@ pub struct Receiver<T> {
 #[stable(feature = "rust1", since = "1.0.0")]
 unsafe impl<T: Send> Send for Receiver<T> { }
 
+#[stable(feature = "rust1", since = "1.0.0")]
+impl<T> !Sync for Receiver<T> { }
+
 /// An iterator over messages on a receiver, this iterator will block
 /// whenever `next` is called, waiting for a new message, and `None` will be
 /// returned when the corresponding channel has hung up.
@@ -327,6 +330,9 @@ pub struct Sender<T> {
 #[stable(feature = "rust1", since = "1.0.0")]
 unsafe impl<T: Send> Send for Sender<T> { }
 
+#[stable(feature = "rust1", since = "1.0.0")]
+impl<T> !Sync for Sender<T> { }
+
 /// The sending-half of Rust's synchronous channel type. This half can only be
 /// owned by one thread, but it can be cloned to send to other threads.
 #[stable(feature = "rust1", since = "1.0.0")]