From: Chris Duncan Date: Tue, 12 May 2026 13:55:19 +0000 (-0700) Subject: Eliminate redundant idle flag. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=3444a388748782bf48f2388cab6cff24f7e9c89a;p=libnemo.git Eliminate redundant idle flag. --- 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[] = []