about summary refs log tree commit diff
path: root/src/libstd/sync
diff options
context:
space:
mode:
authorAaron Turon <aturon@mozilla.com>2014-08-04 15:42:36 -0700
committerAaron Turon <aturon@mozilla.com>2014-08-04 16:03:21 -0700
commit68bde0a07396efb415d61047c6b2a8183f47ef30 (patch)
tree2a0d63e3153abbe4f62f15d06ee72c94c7772b2d /src/libstd/sync
parent9de20198aedb3c3419ee503755e04bcc198d3a94 (diff)
downloadrust-68bde0a07396efb415d61047c6b2a8183f47ef30.tar.gz
rust-68bde0a07396efb415d61047c6b2a8183f47ef30.zip
stabilize atomics (now atomic)
This commit stabilizes the `std::sync::atomics` module, renaming it to
`std::sync::atomic` to match library precedent elsewhere, and tightening
up behavior around incorrect memory ordering annotations.

The vast majority of the module is now `stable`. However, the
`AtomicOption` type has been deprecated, since it is essentially unused
and is not truly a primitive atomic type. It will eventually be replaced
by a higher-level abstraction like MVars.

Due to deprecations, this is a:

[breaking-change]
Diffstat (limited to 'src/libstd/sync')
-rw-r--r--src/libstd/sync/mod.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libstd/sync/mod.rs b/src/libstd/sync/mod.rs
index cc32818baa4..1d189f8d4bc 100644
--- a/src/libstd/sync/mod.rs
+++ b/src/libstd/sync/mod.rs
@@ -17,12 +17,18 @@
 
 #![experimental]
 
-pub use core_sync::{atomics, deque, mpmc_bounded_queue, mpsc_queue, spsc_queue};
+#[stable]
+pub use core_sync::atomic;
+
+pub use core_sync::{deque, mpmc_bounded_queue, mpsc_queue, spsc_queue};
 pub use core_sync::{Arc, Weak, Mutex, MutexGuard, Condvar, Barrier};
 pub use core_sync::{RWLock, RWLockReadGuard, RWLockWriteGuard};
 pub use core_sync::{Semaphore, SemaphoreGuard};
 pub use core_sync::one::{Once, ONCE_INIT};
 
+#[deprecated = "use atomic instead"]
+pub use atomics = core_sync::atomic;
+
 pub use self::future::Future;
 pub use self::task_pool::TaskPool;