harn-cli 0.7.24

CLI for the Harn programming language — run, test, REPL, format, and lint
1
2
3
4
5
6
7
8
9
10
use std::sync::OnceLock;

use tokio::sync::Mutex;

static ENV_LOCK: OnceLock<Mutex<()>> = OnceLock::new();

/// Serialize tests that mutate process-wide environment variables.
pub(crate) fn lock_env() -> &'static Mutex<()> {
    ENV_LOCK.get_or_init(|| Mutex::new(()))
}