Open SlexAxton opened 3 hours ago
It's possible workers should have their own --worker-preload
or simply take the preload argument as an option on new Worker(path, {preload: './file/from/root.ts'})
--worker-preload sounds good + adding a preload
argument
i may transfer data to worker by globalThis variable without postMessage method ?
i may transfer data to worker by globalThis variable without postMessage method ?
i wish
you'll need to use postMessage or a SharedArrayBuffer
if you want to be very fancy
What version of Bun is running?
1.1.33+247456b67
What platform is your computer?
Darwin 23.5.0 arm64 arm
What steps can reproduce the bug?
What is the expected behavior?
What do you see instead?
Additional information
I'm not super sure how it should work for sure! But! For something like opentelemetry, it means that all of my telemetry is silently ignored inside of my workers.
I'd hope there's some way to make it to where I could reliably load the
telemetry.ts
file for everything.It's possible there's a better way than
--preload
to add the telemetry file, but that's how @Jarred-Sumner is suggesting it in this issue: https://github.com/oven-sh/bun/issues/3775#issuecomment-1892843091