docs(cordis-tutorial): note PENDING fibers do not keep Node alive

This commit is contained in:
Turtle
2026-07-22 17:19:46 +08:00
parent 1628f50283
commit bbcc8faa95
+1 -1
View File
@@ -67,7 +67,7 @@ Compose and run:
Hello, world!
```
Swap the two lines in `cordis.yml` and rerun: same output. Try removing `./greeter.ts` entirely: the consumer stays PENDING and prints nothing — no crash, no partial run. [Chapter 6](06-composition-and-hmr.md) shows how to diagnose that state.
Swap the two lines in `cordis.yml` and rerun: same output. Try removing `./greeter.ts` entirely: the consumer stays PENDING and prints nothing — no crash, no partial run. A PENDING fiber does not keep Node's event loop alive either, so a composition with nothing else running exits 0 silently. [Chapter 6](06-composition-and-hmr.md) shows how to diagnose that state.
## Dependencies are live