Javascript Runtime Environment中的task queue(macro task queue)是一个集合数据结构吗?
Does task queue(macro task queue) in Javascript Runtime Environment is a set data structure?
Task queues are sets, not queues, because step one of the event loop processing model grabs the first runnable task from the chosen queue, instead of dequeuing the first task.
whatwg 网站上提到了这一点Link,我无法理解为什么使用集合数据结构而不是队列。
Task queues are sets, not queues, because step one of the event loop processing model grabs the first runnable task from the chosen queue, instead of dequeuing the first task.
whatwg 网站上提到了这一点Link,我无法理解为什么使用集合数据结构而不是队列。