worker[Symbol.asyncDispose]()


新增于: v24.2.0

退出 dispose 作用域时调用 worker.terminate()

\Calls worker.terminate() when the dispose scope is exited.

async function example() {
 await using worker = new Worker('for (;;) {}', { eval: true });
 // Worker is automatically terminate when the scope is exited.
} 

AltStyle によって変換されたページ (->オリジナル) /