tinypool
tinypool copied to clipboard
🧵 A minimal and tiny Node.js Worker Thread Pool implementation (38KB)
This PR also includes: - update pnpm to 9.0.6 - update engines to node 18 or >= 20 - update tsup to 8: now all assets in dist and entry...
Tinypool is conflicting so some dependency: ``` Error: node_modules/tinypool/dist/index.d.ts(21,15): error TS2417: Class static side 'typeof EventEmitterAsyncResource' incorrectly extends base class static side 'typeof EventEmitter'. Types of property 'EventEmitterAsyncResource' are incompatible....
- Instead of using Node APIs like in #70, use Bun's native Workers API Benchmarking ``` $ bun isolate-benchmark.mjs > Options: { THREADS: 8, ROUNDS: 2000, IS_BUN: true } >...
related to #25
Two feature requests here: 1. Passing `workerData: Tinypool.move(data)` is not supported, even though `new Worker` has a `transferList` option. 2. If `workerData` is a plain object, Tinypool should iterate its...
Refactors internal runtime APIs. Preparation for making runtime APIs public for custom runtimes, e.g. Vitest browser mode runtime. Codebase of `piscina` is really complex. 😢
```diff const pool = new Tinypool({ - filename: new URL('./worker.mjs', import.meta.url).href, + filename: new URL('./worker.mjs', import.meta.url), }) ``` 1. Convenient to use 1. Align with [`Worker` constructor](https://nodejs.org/api/worker_threads.html#new-workerfilename-options)
Runner proxy allows easily consume Typescript (and typed JS) modules the same way as if they would be imported as `import * as runner` Async functions are typed the same,...
And group update per types