Answer: Simulate multi-threading with "rotary time slices" (segments that perform multiple tasks in turn in a short period of time)
Method to realize:
- Existing task 1, task 2
- Split task 1 and task 2
- Randomly arrange these task fragments to form a queue
- Send the task fragments to the JS engine in this queue order
- The JS engine executes these task fragments in turn
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。