-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Labels
Workeruses the web or node worker apiuses the web or node worker apiecosystemSomething that relates to package or framework compatibilitySomething that relates to package or framework compatibilityenhancementNew feature or requestNew feature or requestnode.jsCompatibility with Node.js APIsCompatibility with Node.js APIsnode:child_process
Description
Piscina.js is a popular worker pool library which does not currently work in Bun
Simple repro:
// parent.ts
import { Piscina } from 'piscina';
const piscina = new Piscina({
filename: new URL('./child.ts', import.meta.url).href,
});
const result = await piscina.run({ a: 4, b: 6 });
console.log(result);// child.ts
export default ({ a, b }: {a: number, b: number}) => a + b;$ bun parent.ts
#19920 added support for node:perf_hooks.createHistogram which was an API blocking piscina, but it does not currently support transferring/serialization for structuredClone/related apis. This could be why piscina does not work yet. We need to investigate! ![]()
TrackZone1, atomicpages, stonega, dilawar, samwightt and 2 more7rulnik, alii, kravetsone, lin72h, trongtindev and 15 more
Metadata
Metadata
Assignees
Labels
Workeruses the web or node worker apiuses the web or node worker apiecosystemSomething that relates to package or framework compatibilitySomething that relates to package or framework compatibilityenhancementNew feature or requestNew feature or requestnode.jsCompatibility with Node.js APIsCompatibility with Node.js APIsnode:child_process