AsyncMutex import { AsyncMutex } from "destack:async"; Asynchronous mutual exclusion lock. export class AsyncMutex { value: T; constructor(value: T); lock(): Task>; tryLock(): AsyncMutexGuard | undefined; getExclusive(): &exclusive T; intoInner(): T; } language/library/src/async/mutex.ds:8:36 Members value: T The protected value. constructor(value: T) Create an async mutex protecting value. lock(): Task> Lock this mutex by suspending the current task. tryLock(): AsyncMutexGuard | undefined Try to lock this mutex without suspending. getExclusive(): &exclusive T Borrow the protected value without locking. intoInner(): T Consume this mutex and return the protected value.