Number of worker links.
Tasks are spread round robin over the first width workers.
Closes the channels. Tasks that were not joined are dropped.
Returns the records of tasks joined since the last call and clears them.
Blocks the calling thread until the task finishes. Use it where the caller cannot yield.
Waits for the task without blocking the event loop.
The worker end of link index. List its port in the worker's transferList.
Submits every job, then joins them in submission order.
Starts a task and returns a handle for join.
Starts a task whose input is a JSON value.
Runs named functions in private contexts on other threads. The owner submits a task with a name and a copied input, keeps working, and joins the copied output. Nothing is shared between the owner and a worker, so tasks must not depend on each other's state;
auditchecks that.new TaskPool(count)creates the channels. The caller starts each worker, hands itlink(index)and callsserveTasksthere.new TaskPool(links)attaches to owner ends made bycreateTaskLinks, for an owner that runs in a worker.