perf: wake promptly while cooperative source tasks remain runnable
Verify Tessera GUI / verify (push) Failing after 9m31s

This commit is contained in:
2026-10-23 20:04:42 +08:00
parent e0a7d8169c
commit 7bb59fe06f
4 changed files with 34 additions and 9 deletions
+3 -5
View File
@@ -107,11 +107,9 @@ fn start_server_observed(
continue;
}
worker.refresh_viewport(&worker_namespace, &worker_notify);
let wait = if worker
.repl
.as_ref()
.is_some_and(|(_, runtime)| runtime.has_pending_refresh())
{
let wait = if worker.repl.as_ref().is_some_and(|(_, runtime)| {
runtime.has_pending_refresh() || runtime.has_cooperative_tasks()
}) {
std::time::Duration::from_millis(1)
} else {
std::time::Duration::from_millis(100)