Skip to content

Commit 514262c

Browse files
jasnelladuh95
andauthored
Update doc/api/worker_threads.md
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent a8ffbcd commit 514262c

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

doc/api/worker_threads.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1852,14 +1852,7 @@ active handle in the event system. If the worker is already `unref()`ed calling
18521852
added: REPLACEME
18531853
-->
18541854

1855-
Calls [`worker.terminate()`][] when the dispose scope is exited.
1856-
1857-
```js
1858-
async function example() {
1859-
await using worker = new Worker('for (;;) {}', { eval: true });
1860-
// Worker is automatically terminate when the scope is exited.
1861-
}
1862-
```
1855+
Alias for [`worker.terminate()`][].
18631856

18641857
## Notes
18651858

0 commit comments

Comments
 (0)