From 3444a388748782bf48f2388cab6cff24f7e9c89a Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Tue, 12 May 2026 06:55:19 -0700 Subject: [PATCH] Eliminate redundant idle flag. --- src/lib/vault/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/vault/index.ts b/src/lib/vault/index.ts index 16f4108..bb75ffb 100644 --- a/src/lib/vault/index.ts +++ b/src/lib/vault/index.ts @@ -21,7 +21,6 @@ const TERMINATED = 'Worker terminated' export class Vault { #eventTarget: EventTarget = new EventTarget() #job?: Task - #isIdle: boolean = true #isLocked: boolean = true #isTerminated: boolean = false #queue: Task[] = [] @@ -65,7 +64,7 @@ export class Vault { reject } this.#queue.push(task) - if (this.#isIdle) this.#process() + if (this.#job == null) this.#process() }) } @@ -85,7 +84,6 @@ export class Vault { #process = (): void => { this.#job = this.#queue.shift() - this.#isIdle = this.#job == null if (this.#job != null) { const { url, id, data, reject } = this.#job const buffers: ArrayBuffer[] = [] -- 2.47.3