25

模拟实现 JS 引擎:深入了解 JS机制 以及 Microtask and Macrotask

 5 years ago
source link: https://juejin.im/post/5c4041805188252420629086
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
如果JavaScript是单线程的,那么我们如何像在Java中那样创建和运行线程? 很简单,我们使用events或设定一段代码在给定时间执行,这种异步性在 JavaScript 中称为 event loop。 在这篇文章中,主要想分析两个点: Javasc

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK