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:
Yelim Koo
2024-08-01 02:11:13 +09:00
committed by GitHub
parent 67bc6a4a3e
commit 7941b4b333

View File

@@ -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,