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 2c418d6 commit 9a7f1eaCopy full SHA for 9a7f1ea
src/loop.zig
@@ -83,6 +83,12 @@ pub const SingleThreaded = struct {
83
}
84
85
pub fn deinit(self: *Self) void {
86
+ // first disable callbacks for existing events.
87
+ // We don't want a callback re-create a setTimeout, it could create an
88
+ // infinite loop on wait for events.
89
+ self.resetJS();
90
+ self.resetZig();
91
+
92
// run tail events. We do run the tail events to ensure all the
93
// contexts are correcly free.
94
while (self.eventsNb(.js) > 0 or self.eventsNb(.zig) > 0) {
0 commit comments