📜  什么是 webworker - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:59.858000             🧑  作者: Mango

代码示例1
web worker
Web Workers are a mechanism to create a separate thread 
in parallel to your main JS program thread. 
can only communicate with each other through normal async events 
always abide by the event-loop one-at-a-time behavior 
required by run-to-completion.