mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-01 07:33:12 +08:00
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:
co-authored by
Claude Opus 5.5
parent
f43332a0b6
commit
78fc4be1b4
@@ -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>
|
||||
|
||||
+3
@@ -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.
|
||||
Reference in New Issue
Block a user