worker-thread Questions
3
I'm trying to spawn threads (using the new Nodejs module 'worker_threads') and pass to each of them a complex object which is the 'page' object of a Puppeteer browser.newPage() instance. I tried bo...
Consternation asked 28/11, 2018 at 11:40
3
Solved
I have an electron app where I am trying to push some CPU intensive tasks to a worker thread. This works well when I start the app using npm start, but after packing the app (with electron-packager...
Sway asked 9/12, 2019 at 17:43
3
Solved
So, I was reading some stuff regarding Node.js and I was amazed when I came across Worker Threads.
Having threads in my opinion is a great plus especially if you combine it with shared memory acces...
Chemisette asked 27/6, 2018 at 1:9
0
I'm trying to write a node code that will read multiple json files from directory and insert mapped data into mongodb collection. In order to speed up the process, I have follwed following steps:
...
Mufinella asked 3/1, 2023 at 12:38
2
Solved
Is there a way to create a direct communication channel using new MessageChannel between two worker threads? For Eg: There is a main thread P that I have created using the worker_thread API, which ...
Astrology asked 12/9, 2019 at 2:14
2
Nodejs can not have a built-in thread API like java and .net
do. If threads are added, the nature of the language itself will
change. It’s not possible to add threads as a new set of available
...
Calabria asked 16/12, 2019 at 17:48
2
In Nodejs, using Express as a server, I offload a heavy computation onto a worker thread.
From the main application, I call the worker thread like this:
// file: main.js
const { Worker } = requi...
Battik asked 30/10, 2019 at 14:57
1
I would like to create a worker thread in a node.js app and pass the current context to the new thread, so I would be able to access my variables and functions within the new thread, Is there is a ...
Araby asked 7/9, 2021 at 8:1
1
Solved
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 declare a class and instanciate a new Wor...
Dryden asked 19/11, 2020 at 21:42
1
node v10.16.3
I was running an worker_threads example from node official doc. I made some changes as want to test share variables. Here is an example
work-thread.js
const {
Worker,
isMainThrea...
Duplex asked 21/8, 2019 at 16:58
1
Solved
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 how it solves this inefficiency problem by cre...
Rosyrot asked 13/7, 2020 at 22:14
1
Solved
Let's assume i have a nodejs serverProgram with one api and it does some manipulations on the video file, sent via the http request.
const saveVideoFile=(req,res)=>{
processAndSaveVideoFile()...
Gader asked 16/5, 2020 at 3:27
1
I have been reading about multi-processing on NodeJS to get the best understanding and try to get a good performance in heavy environments with my code.
Although I understand the basic purpose and...
Cloris asked 20/4, 2020 at 17:58
1
Solved
I receive the error Error [ERR_WORKER_OUT_OF_MEMORY]: worker terminated due to reaching memory limit, when I try to run nodejs worker threads in resource constrained windows environment.
What is...
Echolalia asked 16/4, 2020 at 17:19
2
Solved
I have a Node.js application running an Express server and a worker thread that does something at regular intervals.
When the server is stopped, I need to clean up a connection to an external syst...
Satirize asked 13/10, 2019 at 16:52
0
Is there an option by which we can make the main thread wait until all worker threads are done?
In the below code, mainThread.js simply creates workers.
The worker takes long time to execute.
In th...
Tremulant asked 10/5, 2019 at 9:33
1
Solved
I'm a little confused about intentService. The docs say that if you send an intentService multiple tasks (intents) then it will execute them one after the other on one separate thread. My question ...
Whinstone asked 13/6, 2016 at 17:0
2
Solved
I'm building an application which have a Service. I know that all application components run in the same UI process, at least you specify it in the manifest. So to avoid ANR's messages i have three...
Adversity asked 7/2, 2013 at 20:36
1
Solved
So far, no one (not even the GAE docs) has been able to give me a really clear description of what the difference is between a push queue and a pull queue.
My understanding is that the Task Queue ...
Gifted asked 7/9, 2012 at 11:54
1
Solved
I have a MFC application, which has a worker thread, what I want to do is to post message from worker thread to the Main GUI thread to update some status messages on GUI. What I have done so far is...
Desiderate asked 23/5, 2012 at 12:26
1
Solved
I am currently working on a GUI software project for visualizing 3D scenes using Qt. The GUI allows user to load batches of 3D data files such as .obj with some .mtl support and .stl as well as 2D ...
Szechwan asked 13/9, 2011 at 9:21
3
Solved
in Scala 2.8 when I start actors, I can communicate via message passing. This in turn means that I can send the ultimate Exit() message or whatever I decide fits my protocol.
But how will I check i...
Electrocautery asked 28/11, 2010 at 15:53
6
Solved
I have an object that requires a lot of initialization (1-2 seconds on a beefy machine). Though once it is initialized it only takes about 20 miliseconds to do a typical "job"
In order to prevent ...
Snapback asked 14/10, 2009 at 15:21
2
Solved
I'm writing a little chat app, and I have this event handler:
void o_Typing(object sender, EventArgs e)
{
MessageBox.Show("Fired!");
this.Text = "Fired!";
}
o_Typing is a method in a class der...
Beldam asked 1/7, 2009 at 6:15
1
© 2022 - 2024 — McMap. All rights reserved.