-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Closed
Labels
bugSomething isn't workingSomething isn't workingnode.jsCompatibility with Node.js APIsCompatibility with Node.js APIs
Description
What version of Bun is running?
any release after #4114
What platform is your computer?
No response
What steps can reproduce the bug?
In #4114, there is one skipped test which is basically trying to terminate a worker like
while(1) {}
The .terminate() will never actually happen as it only is handled in the web_worker.zig event loop. We need to half the current JS execution.
I tried doing this (read VMTraps.h, i exposed some code on zig VM struct to send these) but it either did not work or segfaulted. The workaround only unrefs the worker, which if there is no extra work on the main thread or message listeners, this will be enough to let the main thread die on it's own, but that's not a real solution.
We need to properly kill the JS execution and then emit the close event on the worker.
AriPerkkio and SukkaW
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingnode.jsCompatibility with Node.js APIsCompatibility with Node.js APIs