diff options
Diffstat (limited to 'src/bun.js')
-rw-r--r-- | src/bun.js/event_loop.zig | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/bun.js/event_loop.zig b/src/bun.js/event_loop.zig index 53b6dcf1f..30cae84dd 100644 --- a/src/bun.js/event_loop.zig +++ b/src/bun.js/event_loop.zig @@ -308,10 +308,7 @@ pub const EventLoop = struct { global_vm.drainMicrotasks(); } - if (this.tasks.count == 0) { - this.tasks.head = 0; - } - + this.tasks.head = if (this.tasks.count == 0) 0 else this.tasks.head; return @truncate(u32, counter); } @@ -484,8 +481,8 @@ pub const EventLoop = struct { if (this.virtual_machine.uws_event_loop == null) { var actual = uws.Loop.get().?; this.virtual_machine.uws_event_loop = actual; - this.gc_timer = uws.Timer.create(actual, this); - this.gc_repeating_timer = uws.Timer.create(actual, this); + this.gc_timer = uws.Timer.createFallthrough(actual, this); + this.gc_repeating_timer = uws.Timer.createFallthrough(actual, this); var gc_timer_interval: i32 = 1000; if (this.virtual_machine.bundler.env.map.get("BUN_GC_TIMER_INTERVAL")) |timer| { |