authorgravatar for mail@isaacfreund.comIsaac Freund <mail@isaacfreund.com> 2020-10-27 21:40:22+01:00
committergravatar for mail@isaacfreund.comIsaac Freund <mail@isaacfreund.com> 2020-10-27 21:40:22+01:00
log504f259c24f202d9160da3f13d7091086162d2d3
treeaf5a58de0bcd3bbceb7e87d3f6a93f6a9a820581
parent1b34365ca1f7222a82054ece1901ffb87ffc8b21
signaturelock-open Commit is signed but in an unrecognized format.

std/event: fix zig fmt regression


1 files changed, 6 insertions(+), 6 deletions(-)

lib/std/event/loop.zig+6-6
......@@ -773,7 +773,7 @@ pub const Loop = struct {
773773 self.delay_queue.waiters.insert(&entry);
774774
775775 // Speculatively wake up the timer thread when we add a new entry.
776 // If the timer thread is sleeping on a longer entry, we need to
776 // If the timer thread is sleeping on a longer entry, we need to
777777 // interrupt it so that our entry can be expired in time.
778778 self.delay_queue.event.set();
779779 }
......@@ -785,7 +785,7 @@ pub const Loop = struct {
785785 thread: *std.Thread,
786786 event: std.AutoResetEvent,
787787 is_running: bool,
788
788
789789 /// Initialize the delay queue by spawning the timer thread
790790 /// and starting any timer resources.
791791 fn init(self: *DelayQueue) !void {
......@@ -800,7 +800,7 @@ pub const Loop = struct {
800800 };
801801 }
802802
803 /// Entry point for the timer thread
803 /// Entry point for the timer thread
804804 /// which waits for timer entries to expire and reschedules them.
805805 fn run(self: *DelayQueue) void {
806806 const loop = @fieldParentPtr(Loop, "delay_queue", self);
......@@ -848,12 +848,12 @@ pub const Loop = struct {
848848 const entry = self.peekExpiringEntry() orelse return null;
849849 if (entry.expires > now)
850850 return null;
851
851
852852 assert(self.entries.remove(&entry.node));
853853 return entry;
854854 }
855
856 /// Returns an estimate for the amount of time
855
856 /// Returns an estimate for the amount of time
857857 /// to wait until the next waiting entry expires.
858858 fn nextExpire(self: *Waiters) ?u64 {
859859 const entry = self.peekExpiringEntry() orelse return null;