* End a query. Returns true if this generation is still current * (meaning the caller should perform cleanup). Returns false if a * newer query has started (stale finally block from a cancelled query).
(generation: number)
| 72 | * newer query has started (stale finally block from a cancelled query). |
| 73 | */ |
| 74 | end(generation: number): boolean { |
| 75 | if (this._generation !== generation) return false |
| 76 | if (this._status !== 'running') return false |
| 77 | this._status = 'idle' |
| 78 | this._notify() |
| 79 | return true |
| 80 | } |
| 81 | |
| 82 | /** |
| 83 | * Force-end the current query regardless of generation. |
no test coverage detected