(
/**
* The generator wrapped by this thread.
*/
public readonly runner: ThreadGenerator & {task?: Thread},
)
| 109 | private queue: ThreadGenerator[] = []; |
| 110 | |
| 111 | public constructor( |
| 112 | /** |
| 113 | * The generator wrapped by this thread. |
| 114 | */ |
| 115 | public readonly runner: ThreadGenerator & {task?: Thread}, |
| 116 | ) { |
| 117 | if (this.runner.task) { |
| 118 | useLogger().error({ |
| 119 | message: `The generator "${getTaskName( |
| 120 | this.runner, |
| 121 | )}" is already being executed by another thread.`, |
| 122 | remarks: reusedGenerator, |
| 123 | }); |
| 124 | this.runner = noop(); |
| 125 | } |
| 126 | this.runner.task = this; |
| 127 | } |
| 128 | |
| 129 | /** |
| 130 | * Progress the wrapped generator once. |
nothing calls this directly
no test coverage detected