diff options
author | Satya Rohith <me@satyarohith.com> | 2024-04-04 01:09:53 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-03 21:39:53 +0200 |
commit | aa08155fd17d638d3e677b9d1181eea0556f1ba0 (patch) | |
tree | 677116de3b1a358f8682b79cba1b60ce2b77c492 | |
parent | 778b0b8eb59c26b2868c5f820e84988b8039597b (diff) |
refactor(ext/node): remove worker_threads dependency on ext:runtime (#23206)
-rw-r--r-- | ext/node/polyfills/worker_threads.ts | 11 |
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; } |