Skip to content

Commit 5f8dba7

Browse files
committed
docs(asynchronous-work): fix misaligned event loop ASCII diagram and add note about future changes to check live page preview
Fix the misaligned diagram spacing and alignment of components. Add a HTML comment to the event loop phase diagram to clarify that the source alignment is intentional for correct HTML rendering. This prevents accidental misalignment by future contributors.
1 parent 8cb595a commit 5f8dba7

1 file changed

Lines changed: 18 additions & 11 deletions

File tree

pages/asynchronous-work/event-loop-timers-and-nexttick.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,36 @@ this document) which may make async API calls, schedule timers, or call
2222
The following diagram shows a simplified overview of the event loop's
2323
order of operations.
2424

25+
<!--
26+
NOTE: This diagram may appear misaligned in the markdown source,
27+
but it renders correctly in the HTML view on the live page.
28+
Future contributors: please do not adjust the alignment here
29+
unless it is also broken on a live page.
30+
-->
31+
2532
```
2633
┌───────────────────────────┐
27-
timers
34+
│ timers │
2835
└─────────────┬─────────────┘
29-
30-
v
36+
37+
v
3138
┌───────────────────────────┐
32-
┌─>│ pending callbacks
39+
┌─>│ pending callbacks │
3340
│ └─────────────┬─────────────┘
3441
│ ┌─────────────┴─────────────┐
35-
│ │ idle, prepare
36-
│ └─────────────┬─────────────┘ ┌───────────────┐
42+
│ │ idle, prepare │
43+
│ └─────────────┬─────────────┘ ┌───────────────
3744
│ ┌─────────────┴─────────────┐ │ incoming: │
38-
│ │ poll │<─────┤ connections, │
45+
│ │ poll │<─────┤ connections, │
3946
│ └─────────────┬─────────────┘ │ data, etc. │
40-
│ ┌─────────────┴─────────────┐ └───────────────┘
41-
│ │ check
47+
│ ┌─────────────┴─────────────┐ └───────────────
48+
│ │ check │
4249
│ └─────────────┬─────────────┘
4350
│ ┌─────────────┴─────────────┐
44-
│ │ close callbacks
51+
│ │ close callbacks │
4552
│ └─────────────┬─────────────┘
4653
│ ┌─────────────┴─────────────┐
47-
└──┤ timers
54+
└──┤ timers │
4855
└───────────────────────────┘
4956
```
5057

0 commit comments

Comments
 (0)