diff --git a/docs/content/docs/limitations.mdx b/docs/content/docs/limitations.mdx index 88b2ca5fc..cf6114037 100644 --- a/docs/content/docs/limitations.mdx +++ b/docs/content/docs/limitations.mdx @@ -172,6 +172,8 @@ title: "Limitations" ../limitations/runtime-differences-from-node-js.mdx +../limitations/runtime-differences-from-node-js/event-order-across-native-code-and-islands.mdx + ### Array bounds and runtime errors ../limitations/array-bounds-and-runtime-errors.mdx diff --git a/docs/content/limitations/runtime-differences-from-node-js/event-order-across-native-code-and-islands.mdx b/docs/content/limitations/runtime-differences-from-node-js/event-order-across-native-code-and-islands.mdx new file mode 100644 index 000000000..49b748f65 --- /dev/null +++ b/docs/content/limitations/runtime-differences-from-node-js/event-order-across-native-code-and-islands.mdx @@ -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.