From 324f89de83784887bf7562c68309cb460fb83e32 Mon Sep 17 00:00:00 2001 From: Chris Tate Date: Mon, 26 Oct 2026 21:50:42 -0500 Subject: [PATCH] Give 6809's island and native timers room on a loaded host 6809-node-island-stdio armed a 5 ms island timer and a 10 ms native timer next to immediates. On a loaded host the main script can run past 5 ms after arming, so Node runs the island timer before the immediates and the output order depends on load. The timers are now 50 ms and 100 ms, well after the script and the immediates finish; the expected order is unchanged. --- tests/corpus/6809-node-island-stdio/main.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/corpus/6809-node-island-stdio/main.ts b/tests/corpus/6809-node-island-stdio/main.ts index 209dda8a5..90af5e253 100644 --- a/tests/corpus/6809-node-island-stdio/main.ts +++ b/tests/corpus/6809-node-island-stdio/main.ts @@ -10,12 +10,14 @@ process.stdout.write("native write 1\n"); console.error("native error 1"); callSync("./stdio.cjs", "big", 200000); process.stdout.write(`${"n".repeat(200000)}\n`); -callSync("./stdio.cjs", "later", 5); +// The island timer (50 ms) and the native timer (100 ms) are due well +// after this script and the immediates finish, on a loaded host too. +callSync("./stdio.cjs", "later", 50); setTimeout(() => { console.log("native timer log"); callSync("./stdio.cjs", "write", "2"); console.error("native timer error"); -}, 10); +}, 100); setImmediate(() => console.log("native immediate log")); process.on("exit", () => console.log("native exit listener log")); console.log("native log 2");