(op: CmapOperation)
| 121 | } |
| 122 | |
| 123 | private async _runOperation(op: CmapOperation): Promise<void> { |
| 124 | const operationFn = this.#knownCommands[op.name]; |
| 125 | if (!operationFn) { |
| 126 | throw new Error(`Invalid command ${op.name}`); |
| 127 | } |
| 128 | |
| 129 | await operationFn(op); |
| 130 | await sleep(); |
| 131 | } |
| 132 | |
| 133 | queue(op: CmapOperation, thread?: Thread) { |
| 134 | if (this.#killed || this.#error) { |