首页 > 【JS事件循环模型相关】Zonejs源码中提到的 `VM yield` 是什么意思

【JS事件循环模型相关】Zonejs源码中提到的 `VM yield` 是什么意思

 * A JS VM can be modeled as a [MicroTask] queue, [MacroTask] queue, and [EventTask] set.
 *
 * - [MicroTask] queue represents a set of tasks which are executing right after the current stack
 *   frame becomes clean and before a VM yield. All [MicroTask]s execute in order of insertion
 *   before VM yield and the next [MacroTask] is executed.
 * - [MacroTask] queue represents a set of tasks which are executed one at a time after each VM
 *   yield. The queue is order by time, and insertions can happen in any location.
 * - [EventTask] is a set of tasks which can at any time be inserted to the end of the [MacroTask]
 *   queue. This happens when the event fires.

Zonejs的源码中有这样的注释,想知道 VM yield 是什么意思

【热门文章】
【热门文章】