mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
doc: remove unused imports from worker_threads.md
PR-URL: https://github.com/nodejs/node/pull/54147 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
@@ -290,10 +290,8 @@ the last one will try to communicate with the main thread.
|
||||
|
||||
```mjs
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { once } from 'node:events';
|
||||
import process from 'node:process';
|
||||
import {
|
||||
isMainThread,
|
||||
postMessageToThread,
|
||||
threadId,
|
||||
workerData,
|
||||
@@ -328,9 +326,7 @@ channel.onmessage = channel.close;
|
||||
```
|
||||
|
||||
```cjs
|
||||
const { once } = require('node:events');
|
||||
const {
|
||||
isMainThread,
|
||||
postMessageToThread,
|
||||
threadId,
|
||||
workerData,
|
||||
|
||||
Reference in New Issue
Block a user