diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-06-10 18:43:08 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-06-17 09:07:16 -0700 |
| commit | c032d6fd397d95ccfa7c9bbefc8cc508906b8d34 (patch) | |
| tree | 21818c91cbba8c79903905004bee460df24f7f9a | |
| parent | 68b628b165c91e6abe1bccf9d94eb7c7ef7cdda3 (diff) | |
| download | rust-c032d6fd397d95ccfa7c9bbefc8cc508906b8d34.tar.gz rust-c032d6fd397d95ccfa7c9bbefc8cc508906b8d34.zip | |
std: Stabilize the sync_poison feature
These accessor/constructor methods for a `PoisonError` are quite standard for a wrapper type and enable manipulation of the underlying type.
| -rw-r--r-- | src/libstd/sync/mutex.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sync/rwlock.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/common/poison.rs | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs index 1d630142959..64a5027cc89 100644 --- a/src/libstd/sync/mutex.rs +++ b/src/libstd/sync/mutex.rs @@ -238,7 +238,7 @@ impl<T: ?Sized> Mutex<T> { /// time. You should not trust a `false` value for program correctness /// without additional synchronization. #[inline] - #[unstable(feature = "sync_poison")] + #[stable(feature = "sync_poison", since = "1.2.0")] pub fn is_poisoned(&self) -> bool { self.inner.poison.get() } diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs index 5a6bf987fd7..4ca2e282f70 100644 --- a/src/libstd/sync/rwlock.rs +++ b/src/libstd/sync/rwlock.rs @@ -253,7 +253,7 @@ impl<T: ?Sized> RwLock<T> { /// time. You should not trust a `false` value for program correctness /// without additional synchronization. #[inline] - #[unstable(feature = "sync_poison")] + #[stable(feature = "sync_poison", since = "1.2.0")] pub fn is_poisoned(&self) -> bool { self.inner.poison.get() } diff --git a/src/libstd/sys/common/poison.rs b/src/libstd/sys/common/poison.rs index 75f85879fd1..065b1d6c9ac 100644 --- a/src/libstd/sys/common/poison.rs +++ b/src/libstd/sys/common/poison.rs @@ -120,24 +120,24 @@ impl<T: Send + Reflect> Error for PoisonError<T> { impl<T> PoisonError<T> { /// Creates a `PoisonError`. - #[unstable(feature = "sync_poison")] + #[stable(feature = "sync_poison", since = "1.2.0")] pub fn new(guard: T) -> PoisonError<T> { PoisonError { guard: guard } } /// Consumes this error indicating that a lock is poisoned, returning the /// underlying guard to allow access regardless. - #[unstable(feature = "sync_poison")] + #[stable(feature = "sync_poison", since = "1.2.0")] pub fn into_inner(self) -> T { self.guard } /// Reaches into this error indicating that a lock is poisoned, returning a /// reference to the underlying guard to allow access regardless. - #[unstable(feature = "sync_poison")] + #[stable(feature = "sync_poison", since = "1.2.0")] pub fn get_ref(&self) -> &T { &self.guard } /// Reaches into this error indicating that a lock is poisoned, returning a /// mutable reference to the underlying guard to allow access regardless. - #[unstable(feature = "sync_poi")] + #[stable(feature = "sync_poison", since = "1.2.0")] pub fn get_mut(&mut self) -> &mut T { &mut self.guard } } |
