mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
vm: tick any remaining tasks before exit
This commit is contained in:
@@ -834,6 +834,7 @@ extern fn Zig__GlobalObject__destructOnExit(*JSGlobalObject) void;
|
||||
|
||||
pub fn globalExit(this: *VirtualMachine) noreturn {
|
||||
bun.assert(this.isShuttingDown());
|
||||
this.eventLoop().tick();
|
||||
if (this.shouldDestructMainThreadOnExit()) {
|
||||
if (this.eventLoop().forever_timer) |t| t.deinit(true);
|
||||
Zig__GlobalObject__destructOnExit(this.global);
|
||||
|
||||
Reference in New Issue
Block a user