I want to share a variable between parent and worker threads. The variable is heavy (100+ MB - arrays of JSON data) so if I pass it as an argument or ...
I want to share a variable between parent and worker threads. The variable is heavy (100+ MB - arrays of JSON data) so if I pass it as an argument or ...
I want to create a worker to send back an array as response to my main file, but I can't understand why the worker is not sending postMessage to main. ...
I'm new to using worker threads, thanks in advance for your help and time. Using node v12.22.4, mongodb v4.2.19 What I'm trying to achieve is: on cl ...
I found a post describing how to recover an Ethereum wallet keystore by guessing a single password, however, it uses node synchronous code, and I'm tr ...
im trying to process a few hundreds of json.gz files using worker threads. at some point im getting js heap limit error due to 3 big files(about 3gb e ...
I'm creating worker_threads in node and I'm collecting them to custom WorkerPool. All workers are unique, because they have unique worker.threadId. My ...
I have a worker object something like this: When I call mapProp property in parentPort() listener callback inside the workListener() function, it i ...
I'm writing an electron application that uses electron forge for setup and configuration. The project uses Webpack 5 as a bundler and typescript as th ...
I am planning to have worker threads for socket.io rooms. I create a worker thread on the first connection to a room which then sets up firebase liste ...
So my long-term goal here is to run a function from "main.ts" in parallel with 7 different inputs. There's no shared resources, just a pure function. ...
Say I have an async operation like so: Let's say longTask is unpredictable. It hangs and does not resolve some of the time. I understand that we c ...
I have two files, first is state.js which you might see below: The second is the eventListener.js file, which running endlessly. After I launch ...
My code is very simple: I can see working... output in the console, but when I exit the program with command+q, I see an exception in the console: ...
so i have this piece of code that i want to take the input in the main thread and then feed it to the worker threads so i dont have to put the questio ...
I want to insert data into the mongoDB using worker thread Right now I have a worker file, whole purpose of worker file is to save the data into the ...
I would like to know how to take full advantage of the Worker class in nodejs' worker_threads, specifically, on a 1 or 2 cpu system, do tasks get sche ...
To contextualize, I would like to use class instances functions through a Worker Thread from NodeJS "worker_thread" module. In one main.js file I dec ...
I'm experimenting with the Node.js worker_threads module, with the aim of 'collecting' the result of many requests to different APIs. Is this a good u ...
I recently read about Node's "worker_threads" module that allows parallel execution of Javascript code in multiple threads which is useful for CPU-int ...
I always believed that JS was a single threaded language which makes it inefficient for CPU intensive tasks. I recently came across worker threads and ...