aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/base.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js/base.zig')
-rw-r--r--src/bun.js/base.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bun.js/base.zig b/src/bun.js/base.zig
index 0770c77a4..23b00bd8e 100644
--- a/src/bun.js/base.zig
+++ b/src/bun.js/base.zig
@@ -3902,6 +3902,8 @@ pub const Ref = struct {
pub const PollRef = struct {
status: Status = .inactive,
+ const log = Output.scoped(.PollRef, true);
+
const Status = enum { active, inactive, done };
pub inline fn isActive(this: PollRef) bool {
@@ -3943,6 +3945,7 @@ pub const PollRef = struct {
if (this.status != .active)
return;
this.status = .inactive;
+ log("unref", .{});
vm.uws_event_loop.?.num_polls -= 1;
vm.uws_event_loop.?.active -= 1;
}
@@ -3951,6 +3954,7 @@ pub const PollRef = struct {
pub fn ref(this: *PollRef, vm: *JSC.VirtualMachine) void {
if (this.status != .inactive)
return;
+ log("ref", .{});
this.status = .active;
vm.uws_event_loop.?.num_polls += 1;
vm.uws_event_loop.?.active += 1;