just the wait+change no longer works for some reason? switched to wake, somehow better performance

This commit is contained in:
Muaz Ahmad 2023-12-19 12:31:34 +05:00
parent c53efc58a3
commit c91a2a4a0b

View file

@ -89,6 +89,7 @@ pub const ThreadManager = struct {
pub fn unblock(self: *Self) void { pub fn unblock(self: *Self) void {
self.signals.eof_block.store(0, .Release); self.signals.eof_block.store(0, .Release);
self.signals.processed.store(0, .Release); self.signals.processed.store(0, .Release);
std.Thread.Futex.wake(&self.signals.eof_block, @truncate(self.threads.items.len));
} }
}; };