You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Stop all JavaScript execution in the worker thread as soon as possible. Returns a Promise for the exit code that is fulfilled when the 'exit' event is emitted.
Despite the name, it's a graceful exit once the event loop closes
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
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.
The text was updated successfully, but these errors were encountered: