Offload functions to worker threads with shared memory primitives for Node.js.
8
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: assign() returns immutable copy

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+2 -2
+2 -2
docs/superpowers/specs/2026-04-13-per-worker-dispatch-design.md
··· 19 19 20 20 ## `assign()` 21 21 22 - Stamps a `WorkerHandle` onto a task and returns it. The task's type is preserved. 22 + Returns a copy of the task pinned to a specific worker. The original task is unchanged. 23 23 24 24 ```ts 25 25 function assign<T>(worker: WorkerHandle, task: Task<T>): Task<T>; 26 26 function assign<T>(worker: WorkerHandle, task: StreamTask<T>): StreamTask<T>; 27 27 ``` 28 28 29 - Internally sets `task.worker = worker` and returns the same object. 29 + Internally creates a new instance with the same `id` and `args`, sets `worker` on the copy, and returns it. 30 30 31 31 ## `Task` / `StreamTask` Changes 32 32