Skip to content

Implementation of sync_nonpoison and nonpoison_mutex #134663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions library/std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@
#![feature(edition_panic)]
#![feature(format_args_nl)]
#![feature(log_syntax)]
#![feature(nonpoison_mutex)]
#![feature(test)]
#![feature(trace_macros)]
// tidy-alphabetical-end
Expand Down
2 changes: 2 additions & 0 deletions library/std/src/sync/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ pub use self::poison::{MappedMutexGuard, MappedRwLockReadGuard, MappedRwLockWrit
#[unstable(feature = "mpmc_channel", issue = "126840")]
pub mod mpmc;
pub mod mpsc;
#[unstable(feature = "sync_nonpoison", issue = "134645")]
pub mod nonpoison;

#[unstable(feature = "sync_poison_mod", issue = "134646")]
pub mod poison;
Expand Down
10 changes: 10 additions & 0 deletions library/std/src/sync/nonpoison/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//! Non-poisoning syncronous locks.
//!
//! The locks found on this module will not become poisoned when a thread panics whilst holding a guard.

#[unstable(feature = "sync_nonpoison", issue = "134645")]
pub use self::mutex::MappedMutexGuard;
#[unstable(feature = "sync_nonpoison", issue = "134645")]
pub use self::mutex::{Mutex, MutexGuard};

mod mutex;
Loading
Loading