We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c07c08 commit 2565409Copy full SHA for 2565409
src/runtime/loop.zig
@@ -193,6 +193,11 @@ pub const Loop = struct {
193
}
194
195
pub fn timeout(self: *Self, nanoseconds: u63, callback_node: ?*CallbackNode) !usize {
196
+ if (self.stopping and nanoseconds > std.time.ns_per_ms * 500) {
197
+ // we're trying to shutdown, we probably don't want to wait for a new
198
+ // long timeout
199
+ return 0;
200
+ }
201
const completion = try self.alloc.create(Completion);
202
errdefer self.alloc.destroy(completion);
203
completion.* = undefined;
0 commit comments