1
Fork 0

Refactor Lock implementation

This commit is contained in:
John Kåre Alsaker 2023-09-02 23:19:34 +02:00
parent 8fc160b742
commit 61cc00d238
3 changed files with 239 additions and 269 deletions

View file

@ -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
}