* Release the lock and wake up next waiter in queue * @internal - Should only be called by AsyncMutexLock
()
| 35 | * @internal - Should only be called by AsyncMutexLock |
| 36 | */ |
| 37 | release(): void { |
| 38 | this.locked = false; |
| 39 | const next = this.queue.shift(); |
| 40 | if (next) { |
| 41 | next(); // Wake up next waiter |
| 42 | } |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | /** |
no test coverage detected