MCPcopy Index your code
hub / github.com/midrender/revideo / constructor

Method constructor

packages/core/src/threading/Thread.ts:111–127  ·  view source on GitHub ↗
(
    /**
     * The generator wrapped by this thread.
     */
    public readonly runner: ThreadGenerator & {task?: Thread},
  )

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 4

useLoggerFunction · 0.90
getTaskNameFunction · 0.90
noopFunction · 0.85
errorMethod · 0.45

Tested by

no test coverage detected