use std::sync::OnceLock;
use tokio::sync::{Mutex, MutexGuard};
static CWD_LOCK: OnceLock<Mutex<()>> = OnceLock::new();
pub(crate) fn lock_cwd() -> MutexGuard<'static, ()> {
CWD_LOCK.get_or_init(|| Mutex::new(())).blocking_lock()
}
pub(crate) async fn lock_cwd_async() -> MutexGuard<'static, ()> {
CWD_LOCK.get_or_init(|| Mutex::new(())).lock().await
}