summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/worker_threads.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/polyfills/worker_threads.ts')
-rw-r--r--ext/node/polyfills/worker_threads.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/ext/node/polyfills/worker_threads.ts b/ext/node/polyfills/worker_threads.ts
index c34f1fe23..3c8c9d443 100644
--- a/ext/node/polyfills/worker_threads.ts
+++ b/ext/node/polyfills/worker_threads.ts
@@ -21,7 +21,6 @@ import {
serializeJsMessageData,
} from "ext:deno_web/13_message_port.js";
import * as webidl from "ext:deno_webidl/00_webidl.js";
-import { log } from "ext:runtime/06_util.js";
import { notImplemented } from "ext:deno_node/_utils.ts";
import { EventEmitter } from "node:events";
import { BroadcastChannel } from "ext:deno_broadcast_channel/01_broadcast_channel.js";
@@ -38,6 +37,14 @@ const {
TypeError,
} = primordials;
+const debugWorkerThreads = false;
+function debugWT(...args) {
+ if (debugWorkerThreads) {
+ // deno-lint-ignore prefer-primordials
+ console.log(...args);
+ }
+}
+
export interface WorkerOptions {
// only for typings
argv?: unknown[];
@@ -190,7 +197,7 @@ class NodeWorker extends EventEmitter {
break;
}
case 3: { // Close
- log(`Host got "close" message from worker: ${this.#name}`);
+ debugWT(`Host got "close" message from worker: ${this.#name}`);
this.#status = "CLOSED";
return;
}