Skip to content

Commit 8c5aad4

Browse files
Aandrebaconnortsui20
authored andcommitted
add nonpoison module and nonpoison mutex
Commits squashed from rust-lang#134663
1 parent 5795086 commit 8c5aad4

22 files changed

+709
-32
lines changed

library/std/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@
408408
#![feature(edition_panic)]
409409
#![feature(format_args_nl)]
410410
#![feature(log_syntax)]
411+
#![feature(nonpoison_mutex)]
411412
#![feature(test)]
412413
#![feature(trace_macros)]
413414
// tidy-alphabetical-end

library/std/src/sync/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ pub use self::poison::{MappedMutexGuard, MappedRwLockReadGuard, MappedRwLockWrit
224224
#[unstable(feature = "mpmc_channel", issue = "126840")]
225225
pub mod mpmc;
226226
pub mod mpsc;
227+
#[unstable(feature = "sync_nonpoison", issue = "134645")]
228+
pub mod nonpoison;
227229

228230
#[unstable(feature = "sync_poison_mod", issue = "134646")]
229231
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)