MCPcopy
hub / github.com/excalidraw/excalidraw / tick

Method tick

packages/excalidraw/queue.ts:17–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15 private running = false;
16
17 private tick() {
18 if (this.running) {
19 return;
20 }
21 const job = this.jobs.shift();
22 if (job) {
23 this.running = true;
24 job.promise.resolve(
25 promiseTry(job.jobFactory, ...job.args).finally(() => {
26 this.running = false;
27 this.tick();
28 }),
29 );
30 } else {
31 this.running = false;
32 }
33 }
34
35 push<TValue, TArgs extends unknown[]>(
36 jobFactory: Job<TValue, TArgs>,

Callers 1

pushMethod · 0.95

Calls 1

promiseTryFunction · 0.90

Tested by

no test coverage detected