-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Summary
I have a use case that requires many workers continually running - which this package solves quite nicely.
However, my use case additionally requires the dynamic initialization of new workers (including with per-worker constructor arguments), and the ability to terminate the worker thread both from the worker thread and the main thread.
Proposed API
const worker: Worker = await puddle.createWorker(); // Uses default args
const workerWithCustomArgs: Worker = await puddle.createWorker([1, 2, 3]); // Uses custom args;
// Individually invoke a function of a specific worker
let xyz = await worker.calculateXYZ();
// Terminate worker
await puddle.terminate(workerWithCustomArgs);Metadata
Metadata
Assignees
Labels
No labels