Mutex import { Mutex } from "destack:sync"; Mutual exclusion lock. export class Mutex { state: Atomic; value: T; constructor(value: T); lock(): MutexGuard; tryLock(): MutexGuard | undefined; getExclusive(): &exclusive T; intoInner(): T; } language/library/src/sync/mutex.ds:8:39 Members state: Atomic The lock state. value: T The protected value. constructor(value: T) Create a mutex protecting value. lock(): MutexGuard Lock this mutex, blocking the current worker. tryLock(): MutexGuard | undefined Try to lock this mutex without blocking. getExclusive(): &exclusive T Borrow the protected value without locking. intoInner(): T Consume this mutex and return the protected value.