From 7935519ba8f4bf25381527f9b3ad7ed0323a1458 Mon Sep 17 00:00:00 2001 From: Selemela07 <155183204+Selemela07@users.noreply.github.com> Date: Fri, 25 Oct 2024 05:39:41 +0200 Subject: [PATCH] Patch devcontainer.json // threads.mjs import { Worker, isMainThread, workerData, parentPort } from 'node:worker_threads'; if (isMainThread) { const data = 'some data'; const worker = new Worker(import.meta.filename, { workerData: data }); worker.on('message', msg => console.log('Reply from Thread:', msg)); } else { const source = workerData; parentPort.postMessage(btoa(source.toUpperCase())); } // run with `node threads.mjs` --- .devcontainer/devcontainer.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..ad93c14a0f --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,5 @@ +{ + "image": "mcr.microsoft.com/devcontainers/universal:2", + "features": { + } +}