MCPcopy Create free account
hub / github.com/Sethispr/image-compressor / returnWorkerToPool

Function returnWorkerToPool

services/workerService.ts:38–42  ·  view source on GitHub ↗
(worker: Worker)

Source from the content-addressed store, hash-verified

36 * Returns a used worker to the pool so it can process the next image.
37 */
38const returnWorkerToPool = (worker: Worker): void => {
39 worker.onmessage = null;
40 worker.onerror = null;
41 workerPool.push(worker);
42};
43
44/**
45 * The main function to process a single file.

Callers 1

processImageInWorkerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected