std: Fix missing stability in sync
* The `sync` module is stable * The `sync::mpsc` module is stable * The `Sender::send` method is stable. * The `Once::doit` method is now removed. * Deprecated atomic initializers are removed. * Renamed atomic initializers are now stable.
This commit is contained in:
parent
267b73d95e
commit
177f8bc55c
|
@ -146,28 +146,18 @@ pub enum Ordering {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An `AtomicBool` initialized to `false`.
|
/// An `AtomicBool` initialized to `false`.
|
||||||
#[unstable = "may be renamed, pending conventions for static initalizers"]
|
#[stable]
|
||||||
pub const ATOMIC_BOOL_INIT: AtomicBool =
|
pub const ATOMIC_BOOL_INIT: AtomicBool =
|
||||||
AtomicBool { v: UnsafeCell { value: 0 } };
|
AtomicBool { v: UnsafeCell { value: 0 } };
|
||||||
/// An `AtomicInt` initialized to `0`.
|
/// An `AtomicInt` initialized to `0`.
|
||||||
#[unstable = "may be renamed, pending conventions for static initalizers"]
|
#[stable]
|
||||||
pub const ATOMIC_INT_INIT: AtomicInt =
|
pub const ATOMIC_INT_INIT: AtomicInt =
|
||||||
AtomicInt { v: UnsafeCell { value: 0 } };
|
AtomicInt { v: UnsafeCell { value: 0 } };
|
||||||
/// An `AtomicUint` initialized to `0`.
|
/// An `AtomicUint` initialized to `0`.
|
||||||
#[unstable = "may be renamed, pending conventions for static initalizers"]
|
#[stable]
|
||||||
pub const ATOMIC_UINT_INIT: AtomicUint =
|
pub const ATOMIC_UINT_INIT: AtomicUint =
|
||||||
AtomicUint { v: UnsafeCell { value: 0, } };
|
AtomicUint { v: UnsafeCell { value: 0, } };
|
||||||
|
|
||||||
/// Deprecated
|
|
||||||
#[deprecated = "renamed to ATOMIC_BOOL_INIT"]
|
|
||||||
pub const INIT_ATOMIC_BOOL: AtomicBool = ATOMIC_BOOL_INIT;
|
|
||||||
/// Deprecated
|
|
||||||
#[deprecated = "renamed to ATOMIC_INT_INIT"]
|
|
||||||
pub const INIT_ATOMIC_INT: AtomicInt = ATOMIC_INT_INIT;
|
|
||||||
/// Deprecated
|
|
||||||
#[deprecated = "renamed to ATOMIC_UINT_INIT"]
|
|
||||||
pub const INIT_ATOMIC_UINT: AtomicUint = ATOMIC_UINT_INIT;
|
|
||||||
|
|
||||||
// NB: Needs to be -1 (0b11111111...) to make fetch_nand work correctly
|
// NB: Needs to be -1 (0b11111111...) to make fetch_nand work correctly
|
||||||
const UINT_TRUE: uint = -1;
|
const UINT_TRUE: uint = -1;
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
//! and/or blocking at all, but rather provide the necessary tools to build
|
//! and/or blocking at all, but rather provide the necessary tools to build
|
||||||
//! other types of concurrent primitives.
|
//! other types of concurrent primitives.
|
||||||
|
|
||||||
#![experimental]
|
#![stable]
|
||||||
|
|
||||||
pub use alloc::arc::{Arc, Weak};
|
pub use alloc::arc::{Arc, Weak};
|
||||||
pub use core::atomic;
|
pub use core::atomic;
|
||||||
|
|
|
@ -163,6 +163,8 @@
|
||||||
//! }
|
//! }
|
||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
|
#![stable]
|
||||||
|
|
||||||
// A description of how Rust's channel implementation works
|
// A description of how Rust's channel implementation works
|
||||||
//
|
//
|
||||||
// Channels are supposed to be the basic building block for all other
|
// Channels are supposed to be the basic building block for all other
|
||||||
|
@ -565,6 +567,7 @@ impl<T: Send> Sender<T> {
|
||||||
/// drop(rx);
|
/// drop(rx);
|
||||||
/// assert_eq!(tx.send(1i).err().unwrap().0, 1);
|
/// assert_eq!(tx.send(1i).err().unwrap().0, 1);
|
||||||
/// ```
|
/// ```
|
||||||
|
#[stable]
|
||||||
pub fn send(&self, t: T) -> Result<(), SendError<T>> {
|
pub fn send(&self, t: T) -> Result<(), SendError<T>> {
|
||||||
let (new_inner, ret) = match *unsafe { self.inner() } {
|
let (new_inner, ret) = match *unsafe { self.inner() } {
|
||||||
Flavor::Oneshot(ref p) => {
|
Flavor::Oneshot(ref p) => {
|
||||||
|
|
|
@ -121,10 +121,6 @@ impl Once {
|
||||||
unsafe { self.mutex.destroy() }
|
unsafe { self.mutex.destroy() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Deprecated
|
|
||||||
#[deprecated = "renamed to `call_once`"]
|
|
||||||
pub fn doit<F>(&'static self, f: F) where F: FnOnce() { self.call_once(f) }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|
Loading…
Reference in New Issue