diff --git a/pkg/libuv/Embed.zig b/pkg/libuv/Embed.zig index 39a75b87c..371517a19 100644 --- a/pkg/libuv/Embed.zig +++ b/pkg/libuv/Embed.zig @@ -23,7 +23,6 @@ mutex: Mutex, cond: Cond, ready: bool = false, terminate: BoolAtomic, -sleeping: BoolAtomic, callback: std.meta.FnPtr(fn () void), thread: ?Thread, @@ -39,7 +38,6 @@ pub fn init( .mutex = try Mutex.init(alloc), .cond = try Cond.init(alloc), .terminate = BoolAtomic.init(false), - .sleeping = BoolAtomic.init(false), .callback = callback, .thread = null, }; @@ -97,18 +95,6 @@ fn threadMain(self: *Embed) void { const fd = self.loop.backendFd() catch unreachable; const timeout = self.loop.backendTimeout(); - // If the timeout is negative then we are sleeping (i.e. no - // timers active or anything). In that case, we set the boolean - // to true so that we can wake up the event loop if we have to. - if (timeout < 0) { - log.debug("going to sleep", .{}); - self.sleeping.store(true, .SeqCst); - } - defer if (timeout < 0) { - log.debug("waking from sleep", .{}); - self.sleeping.store(false, .SeqCst); - }; - switch (builtin.os.tag) { // epoll .linux => {