Refactor Lock
implementation
This commit is contained in:
parent
8fc160b742
commit
61cc00d238
3 changed files with 239 additions and 269 deletions
|
@ -49,7 +49,7 @@ use std::ops::{Deref, DerefMut};
|
|||
use std::panic::{catch_unwind, resume_unwind, AssertUnwindSafe};
|
||||
|
||||
mod lock;
|
||||
pub use lock::{Lock, LockGuard};
|
||||
pub use lock::{Assume, Lock, LockGuard};
|
||||
|
||||
mod worker_local;
|
||||
pub use worker_local::{Registry, WorkerLocal};
|
||||
|
@ -86,7 +86,6 @@ mod mode {
|
|||
|
||||
// Whether thread safety might be enabled.
|
||||
#[inline]
|
||||
#[cfg(parallel_compiler)]
|
||||
pub fn might_be_dyn_thread_safe() -> bool {
|
||||
DYN_THREAD_SAFE_MODE.load(Ordering::Relaxed) != DYN_NOT_THREAD_SAFE
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue