Generic pool implementation that works with Webworkers, Promises, etc.
npm install @pooley/core> Generic pool implementation that works with Webworkers, Promises, etc.

Requires a specific worker processor, queue and a scaler to excute.
See other packages for a suitable implementations.
Install the library:
```
npm install @pooley/core
`ts
import { WorkerPool, WorkerTask, WorkerPoolEvent } from '@pooley/core';
// Create some task that should process a pool queue
const task: WorkerTask
return new Promise((res) => setTimeout(() => res(data), 1000));
};
// Create a pool with a task and suitable queue/scaler/processor
const pool = new WorkerPool({
task,
queue,
poolScaler,
processorFactory,
});
// Listen to a processed data from the pool
pool.on(WorkerPoolEvent.Data, (ev) => this.log('Pool data: ', ev.data));
// Or wait when it's finished
await pool.once(WorkerPoolEvent.Empty);
`
Run nx build core to build the library.
Run nx test core` to execute the unit tests via Jest.