Zero-cost spin lock abstract with the same API as sys.thread.Mutex Can be used as a drop-in replacement for Mutex in low-contention scenarios
Static methods
staticinlineacquire(this:AtomicBool):Void
Acquire the lock. Blocks (spins) until the lock is available. Same API as Mutex.acquire()
staticinlinetryAcquire(this:AtomicBool):Bool
Try to acquire the lock without blocking. Returns true if lock was acquired, false if already locked. Same API as Mutex.tryAcquire()