* Reserve the guard for queue processing. Transitions idle → dispatching. * Returns false if not idle (another query or dispatch in progress).
()
| 36 | * Returns false if not idle (another query or dispatch in progress). |
| 37 | */ |
| 38 | reserve(): boolean { |
| 39 | if (this._status !== 'idle') return false |
| 40 | this._status = 'dispatching' |
| 41 | this._notify() |
| 42 | return true |
| 43 | } |
| 44 | |
| 45 | /** |
| 46 | * Cancel a reservation when processQueueIfReady had nothing to process. |