-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Event Loop #67
Comments
Event loop: microtasks and macrotasks (javascript.info) JavaScript 运行机制详解:再谈Event Loop - 阮一峰的网络日志 How JavaScript works: an overview of the engine, the runtime, and the call stack How JavaScript works: inside the V8 engine + 5 tips on how to write optimized code JavaScript:彻底理解同步、异步和事件循环(Event Loop) - 追根溯源 - SegmentFault 思否 https://user-gold-cdn.xitu.io/2018/5/24/1639256db41f320b?imageView2/0/w/1280/h/960/format/webp/ignore-error/1 Micro Task
Macro Task
|
Node.jsNode 定时器详解 - 阮一峰的网络日志 (ruanyifeng.com) The Node.js Event Loop, Timers, and process.nextTick() | Node.js (nodejs.org)
|
宏任务和微任务
微任务通常来说就是需要在当前 task 执行结束后立即执行的任务。 console.log('script start');
setTimeout(function() {
console.log('setTimeout');
}, 0);
new Promise((resolve, reject) => {
console.log('in promise');
resolve(1);
}).then(function() {
console.log('promise1');
}).then(function() {
console.log('promise2');
});
console.log('script end'); script start
in promise
script end
promise1
promise2
setTimeout |
Concurrency model and Event Loop - JavaScript | MDN
带你彻底弄懂Event Loop - SegmentFault 思否
从event loop规范探究javaScript异步及浏览器更新渲染时机 · Issue #5 · aooy/blog (github.com)
The text was updated successfully, but these errors were encountered: