parent
e927184629
commit
1ed855dedf
@ -383,8 +383,6 @@ pub fn is_poisoned(&self) -> bool {
|
|||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(mutex_unpoison)]
|
|
||||||
///
|
|
||||||
/// use std::sync::{Arc, Mutex};
|
/// use std::sync::{Arc, Mutex};
|
||||||
/// use std::thread;
|
/// use std::thread;
|
||||||
///
|
///
|
||||||
@ -406,7 +404,7 @@ pub fn is_poisoned(&self) -> bool {
|
|||||||
/// assert_eq!(*x, 1);
|
/// assert_eq!(*x, 1);
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[unstable(feature = "mutex_unpoison", issue = "96469")]
|
#[stable(feature = "mutex_unpoison", since = "CURRENT_RUSTC_VERSION")]
|
||||||
pub fn clear_poison(&self) {
|
pub fn clear_poison(&self) {
|
||||||
self.poison.clear();
|
self.poison.clear();
|
||||||
}
|
}
|
||||||
|
@ -387,8 +387,6 @@ pub fn is_poisoned(&self) -> bool {
|
|||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(mutex_unpoison)]
|
|
||||||
///
|
|
||||||
/// use std::sync::{Arc, RwLock};
|
/// use std::sync::{Arc, RwLock};
|
||||||
/// use std::thread;
|
/// use std::thread;
|
||||||
///
|
///
|
||||||
@ -410,7 +408,7 @@ pub fn is_poisoned(&self) -> bool {
|
|||||||
/// assert_eq!(*guard, 1);
|
/// assert_eq!(*guard, 1);
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[unstable(feature = "mutex_unpoison", issue = "96469")]
|
#[stable(feature = "mutex_unpoison", since = "CURRENT_RUSTC_VERSION")]
|
||||||
pub fn clear_poison(&self) {
|
pub fn clear_poison(&self) {
|
||||||
self.poison.clear();
|
self.poison.clear();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user