mirror of
https://github.com/xfarrow/javascript-tutorials.git
synced 2025-04-19 12:57:21 +02:00
Update event-loop.md
This commit is contained in:
parent
cb1ca667b5
commit
52562f6f1e
@ -1,11 +1,13 @@
|
|||||||
|
# The Event Loop
|
||||||
|
|
||||||
JavaScript is single-threaded but it can still take advantage of asynchronous
|
JavaScript is single-threaded but it can still take advantage of asynchronous
|
||||||
programming.
|
programming.
|
||||||
|
|
||||||
The Event Loop is a Javascript construct responsible
|
In order to do that, the runtime keeps a structure called The Event Loop which
|
||||||
for holding operations to be executed asynchronously with respect to the main
|
is responsible for holding operations to be executed asynchronously with
|
||||||
flow of execution. Whenever we meet a portion of code that may not be
|
respect to the main flow of execution. Whenever we meet a portion of code that
|
||||||
possible to execute now, it is put in the Event Loop. Let's look at some
|
may not be possible to execute now, it is put in the Event Loop. Let's look at
|
||||||
examples:
|
some examples:
|
||||||
|
|
||||||
1.
|
1.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user