-
Notifications
You must be signed in to change notification settings - Fork 0
JavaScript Async
foolmacky edited this page Nov 2, 2023
·
11 revisions
node.jsのエンジンは、ブラウザ上のJavaScriptエンジンに寄せた仕様になってはいるが、ブラウザのエンジンに備わってはいない機構ももつ

- すべてのmicrotaskは次のmacrotaskが実行される前に完了する。実行環境の状態が「同じ」であることを保証する必要があるため。
- microtask間では連続ですべて処理され、間に他のイベントの処理などは挿入されない。
event loop https://ja.javascript.info/event-loop#ref-1256
microtasks https://ja.javascript.info/microtask-queue
promise, async/await https://ja.javascript.info/async
engine and event loop https://www.youtube.com/watch?v=8aGhZQkoFbQ