Document the event-order limitation between native code and islands

Native timers and an island's Node timers run on the hosted libuv loop but are not merged into one order, so callbacks from the two sides can run in a different order than in Node and the order can vary between runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Malte Ubl
2026-10-27 19:39:16 -07:00
co-authored by Claude Opus 5.5
parent f43332a0b6
commit 78fc4be1b4
2 changed files with 5 additions and 0 deletions
+2
View File
@@ -172,6 +172,8 @@ title: "Limitations"
<include>../limitations/runtime-differences-from-node-js.mdx</include>
<include>../limitations/runtime-differences-from-node-js/event-order-across-native-code-and-islands.mdx</include>
### Array bounds and runtime errors
<include>../limitations/array-bounds-and-runtime-errors.mdx</include>
@@ -0,0 +1,3 @@
- **Event order across native code and islands:** Timers, worker output, and other macrotasks from the program and from JavaScript it runs in a Node island share one event loop under Node.js, so their order is fixed.
A compiled program runs both on the event loop it hosts for Node.js, but it does not merge them into one order, so callbacks from the two sides can run in a different order than under Node.js, and the order can vary between runs.
Only programs that depend on the ordering between native and island callbacks are affected.