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
Potential solution is to deinit CallbackJob regardless of promise status
Additional information
This bug affects Worker.terminate() - terminate() returns promise which will never complete if Worker is already terminated. #9998 is affected by this bug.
The fact that Worker.terminate() is not fulfilling promise is separate issue. Node fulfills promise every time, but with undefined status code in this case. In attempt to fix original issue's problem I fixed that in #11376
There's also (absolutely irrelevant to this issue, but still notable) difference in status codes - Worker.terminate() yields status code 0 when thread is actually terminated, whereas Node returns 1
The text was updated successfully, but these errors were encountered:
What version of Bun is running?
1.1.10+5102a9443
What platform is your computer?
Any platform, reproduces everywhere
What steps can reproduce the bug?
This simple code will result in frozen process
What is the expected behavior?
Process exits immediately after setTimeout (which aligns with Node behavior)
What do you see instead?
Process is stuck. For whatever reason if CallbackJob sees promise, it will subscribe and wait until it succeeds, and this is not always the case.
bun/src/bun.js/api/BunObject.zig
Line 3811 in af4e844
Potential solution is to deinit CallbackJob regardless of promise status
Additional information
This bug affects Worker.terminate() - terminate() returns promise which will never complete if Worker is already terminated. #9998 is affected by this bug.
The fact that Worker.terminate() is not fulfilling promise is separate issue. Node fulfills promise every time, but with undefined status code in this case. In attempt to fix original issue's problem I fixed that in #11376
There's also (absolutely irrelevant to this issue, but still notable) difference in status codes - Worker.terminate() yields status code 0 when thread is actually terminated, whereas Node returns 1
The text was updated successfully, but these errors were encountered: