diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-08-05 16:40:04 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-08-07 08:54:38 -0700 |
| commit | 1f760d5d1a448c08ff4b66cfa8d35d39a5d667c0 (patch) | |
| tree | 9befa0d5628cafad50e44dbc28e494dbf3b45487 /src/libgreen/message_queue.rs | |
| parent | b09a02b41588b2348fcce89c37c4a2cdc614d350 (diff) | |
| download | rust-1f760d5d1a448c08ff4b66cfa8d35d39a5d667c0.tar.gz rust-1f760d5d1a448c08ff4b66cfa8d35d39a5d667c0.zip | |
Rename `Share` to `Sync`
This leaves the `Share` trait at `std::kinds` via a `#[deprecated]` `pub use` statement, but the `NoShare` struct is no longer part of `std::kinds::marker` due to #12660 (the build cannot bootstrap otherwise). All code referencing the `Share` trait should now reference the `Sync` trait, and all code referencing the `NoShare` type should now reference the `NoSync` type. The functionality and meaning of this trait have not changed, only the naming. Closes #16281 [breaking-change]
Diffstat (limited to 'src/libgreen/message_queue.rs')
| -rw-r--r-- | src/libgreen/message_queue.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libgreen/message_queue.rs b/src/libgreen/message_queue.rs index 137c4933645..66040633ff1 100644 --- a/src/libgreen/message_queue.rs +++ b/src/libgreen/message_queue.rs @@ -20,18 +20,18 @@ pub enum PopResult<T> { pub fn queue<T: Send>() -> (Consumer<T>, Producer<T>) { let a = Arc::new(mpsc::Queue::new()); - (Consumer { inner: a.clone(), noshare: marker::NoShare }, - Producer { inner: a, noshare: marker::NoShare }) + (Consumer { inner: a.clone(), noshare: marker::NoSync }, + Producer { inner: a, noshare: marker::NoSync }) } pub struct Producer<T> { inner: Arc<mpsc::Queue<T>>, - noshare: marker::NoShare, + noshare: marker::NoSync, } pub struct Consumer<T> { inner: Arc<mpsc::Queue<T>>, - noshare: marker::NoShare, + noshare: marker::NoSync, } impl<T: Send> Consumer<T> { @@ -60,6 +60,6 @@ impl<T: Send> Producer<T> { impl<T: Send> Clone for Producer<T> { fn clone(&self) -> Producer<T> { - Producer { inner: self.inner.clone(), noshare: marker::NoShare } + Producer { inner: self.inner.clone(), noshare: marker::NoSync } } } |
