Skip to content

Commit 1dd5e06

Browse files
authored
Update article.md
"to react on other user actions" -> "to react to other user actions" (a little more natural sounding)
1 parent 0b2cbf9 commit 1dd5e06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

2-ui/99-ui-misc/03-event-loop/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ A single run of `count` does a part of the job `(*)`, and then re-schedules itse
113113
2. Second run counts: `i=1000001..2000000`.
114114
3. ...and so on.
115115

116-
Now, if a new side task (e.g. `onclick` event) appears while the engine is busy executing part 1, it gets queued and then executes when part 1 finished, before the next part. Periodic returns to the event loop between `count` executions provide just enough "air" for the JavaScript engine to do something else, to react on other user actions.
116+
Now, if a new side task (e.g. `onclick` event) appears while the engine is busy executing part 1, it gets queued and then executes when part 1 finished, before the next part. Periodic returns to the event loop between `count` executions provide just enough "air" for the JavaScript engine to do something else, to react to other user actions.
117117

118118
The notable thing is that both variants -- with and without splitting the job by `setTimeout` -- are comparable in speed. There's not much difference in the overall counting time.
119119

0 commit comments

Comments
 (0)