mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-08-19 20:13:44 +00:00
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`
This commit is contained in:
parent
6b70c40f15
commit
7935519ba8
5
.devcontainer/devcontainer.json
Normal file
5
.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"image": "mcr.microsoft.com/devcontainers/universal:2",
|
||||
"features": {
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user