aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bun.js/event_loop.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bun.js/event_loop.zig b/src/bun.js/event_loop.zig
index d4688beac..d8f0338ed 100644
--- a/src/bun.js/event_loop.zig
+++ b/src/bun.js/event_loop.zig
@@ -414,12 +414,12 @@ pub const EventLoop = struct {
if (this.virtual_machine.uws_event_loop == null) {
var actual = uws.Loop.get().?;
this.virtual_machine.uws_event_loop = actual;
- _ = actual.addPostHandler(*JSC.EventLoop, this, JSC.EventLoop.tick);
+ _ = actual.addPostHandler(*JSC.EventLoop, this, JSC.EventLoop.afterUSocketsTick);
_ = actual.addPreHandler(*JSC.VM, this.virtual_machine.global.vm(), JSC.VM.drainMicrotasks);
}
}
- pub fn onDefer(this: *EventLoop) void {
+ pub fn afterUSocketsTick(this: *EventLoop) void {
this.defer_count.store(0, .Monotonic);
this.tick();
}
@@ -432,7 +432,7 @@ pub const EventLoop = struct {
if (this.virtual_machine.uws_event_loop) |loop| {
const deferCount = this.defer_count.fetchAdd(1, .Monotonic);
if (deferCount == 0) {
- loop.nextTick(*EventLoop, this, onDefer);
+ loop.wakeup();
}
}
}