Skip to content

Commit 810664d

Browse files
committed
added non-poison mutex
1 parent ecb170a commit 810664d

File tree

4 files changed

+794
-0
lines changed

4 files changed

+794
-0
lines changed

library/std/src/sync/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ pub use self::poison::{MappedMutexGuard, MappedRwLockReadGuard, MappedRwLockWrit
222222
#[unstable(feature = "mpmc_channel", issue = "126840")]
223223
pub mod mpmc;
224224
pub mod mpsc;
225+
#[unstable(feature = "sync_nonpoison", issue = "134645")]
226+
pub mod nonpoison;
225227

226228
#[unstable(feature = "sync_poison_mod", issue = "134646")]
227229
pub mod poison;

library/std/src/sync/nonpoison/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//! Non-poisoning syncronous locks.
2+
//!
3+
//! The locks found on this module will not become poisoned when a thread panics whilst holding a guard.
4+
5+
#[unstable(feature = "sync_nonpoison", issue = "134645")]
6+
pub use self::mutex::MappedMutexGuard;
7+
#[unstable(feature = "sync_nonpoison", issue = "134645")]
8+
pub use self::mutex::{Mutex, MutexGuard};
9+
10+
mod mutex;

0 commit comments

Comments
 (0)