From: Chris Duncan Date: Tue, 3 Dec 2024 20:20:01 +0000 (-0800) Subject: Ensure worker results are stored only if they exist. X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=e32d28c8abf9c1c856ae8eb9a640ae1bc2518305;p=libnemo.git Ensure worker results are stored only if they exist. --- diff --git a/src/lib/pool.ts b/src/lib/pool.ts index b6fcbb0..1baf3ad 100644 --- a/src/lib/pool.ts +++ b/src/lib/pool.ts @@ -62,6 +62,9 @@ export class Pool { #report (thread: Thread, result: any[]): void { thread.isBusy = false + if (result?.length > 0) { + this.#results.push(...result) + } if (this.#approach === 'converge') { this.#stop() }