use super::*;
mod async_keyed_cache;
mod async_mutex;
mod async_rw_lock;
mod async_semaphore;
mod async_tag_lock;
mod async_weighted_semaphore;
#[cfg(feature = "debug-locks")]
mod debug_locks;
pub use async_keyed_cache::*;
pub use async_mutex::*;
pub use async_rw_lock::*;
pub use async_semaphore::*;
pub use async_tag_lock::*;
pub use async_weighted_semaphore::*;
#[cfg(feature = "debug-locks")]
use debug_locks::*;
pub const DEBUG_LOCKS_DURATION_MS: u32 = 30000;
#[cfg(feature = "debug-locks")]
pub(crate) fn debug_lock_backtrace() -> backtrace::Backtrace {
use std::sync::LazyLock;
static ENABLED: LazyLock<bool> = LazyLock::new(|| {
std::env::var("VEILID_DEBUG_LOCK_BACKTRACES")
.map(|v| v != "0")
.unwrap_or(true)
});
if *ENABLED {
backtrace::Backtrace::new_unresolved()
} else {
backtrace::Backtrace::from(Vec::new())
}
}