fix(windows): force no-sleep mode on windows

This is possibly just a workaround. Sleeping on windows causes the task queue
to run empty even though we have pending async reads. This is possibly an
issue with asio on windows that may be difficult to fix properly. For now
we just disable sleeping altogether and leave the frame metronome running
which will keep flow alive.
This commit is contained in:
CJ van den Berg 2024-06-08 20:02:02 +02:00
parent ee6582b469
commit 4d8d538c9a

View file

@ -138,7 +138,7 @@ pub fn main() anyerror!void {
env.set("no-alternate", (res.args.@"no-alternate" != 0));
env.set("show-input", (res.args.@"show-input" != 0));
env.set("show-log", (res.args.@"show-log" != 0));
env.set("no-sleep", (res.args.@"no-sleep" != 0));
env.set("no-sleep", (builtin.os.tag == .windows or res.args.@"no-sleep" != 0));
env.set("dump-stack-trace", (res.args.@"debug-dump-on-error" != 0));
if (res.args.@"frame-rate") |s| env.num_set("frame-rate", @intCast(s));
env.proc_set("log", log_proc.ref());