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.
This commit is contained in:
Chris Tate
2026-10-26 21:50:42 -05:00
parent f5b8ff9019
commit 324f89de83
+4 -2
View File
@@ -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");