Questions tagged [worker-thread]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
7 votes
1 answer
15k views

PostMessage from WorkerThread to Main Window in MFC

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 ...
Muhammad Ummar's user avatar
2 votes
2 answers
1k views

Execute long running operations on the service

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 ...
AXSM's user avatar
  • 1,162
29 votes
3 answers
18k views

Node.js worker threads shared object/store

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 access. ...
0x_Anakin's user avatar
  • 3,239
9 votes
6 answers
5k views

Proper way to have an endless worker thread?

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 it ...
Neil N's user avatar
  • 25k
6 votes
2 answers
2k views

How worker threads works in Nodejs?

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 ...
Sandeep Patel's user avatar
5 votes
3 answers
3k views

Scala, check if Actor has exited

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 if ...
Felix's user avatar
  • 8,435
4 votes
3 answers
1k views

Shared worker working before packing app, but not working after (electron)

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 ...
cheesemas46's user avatar
3 votes
2 answers
944 views

Boost Thread Specific Storage Question (boost/thread/tss.hpp)

The boost threading library has an abstraction for thread specific (local) storage. I have skimmed over the source code and it seems that the TSS functionality can be used in an application with any ...
Hassan Syed's user avatar
  • 20.3k
2 votes
1 answer
3k views

Sleep(suspend) and Resuming windows form starts program on worker thread instead of main thread

The windows form I am working on subscribes to Microsoft.Win32.SystemEvents.PowerModeChanged and on Suspend it runs the Close() method on the form. On Resume it runs the Run() function like it would ...
madeFromCode's user avatar
2 votes
5 answers
6k views

Is it possible to call the main thread from a worker thread in Java?

I have a method called action() that deploys three threads. Each deployed thread or worker thread falls into a while loop based on a single instance variable of type boolean being true, for example ...
user9349193413's user avatar
2 votes
1 answer
3k views

I/O performance in Node.js worker threads

Here's an example with worker thread that takes ~600ms on local machine for synchronous I/O: const fs = require('fs'); const { isMainThread, Worker, parentPort, workerData } = require('worker_threads'...
Estus Flask's user avatar
2 votes
5 answers
7k views

How can I tell if a thread is finished executing without polling ThreadState?

Is there an elegant way to know when a worker thread is done executing so I can access resources it produced? For example if the worker thread queried a list of SQL Servers using ...
Mark Carpenter's user avatar
1 vote
2 answers
343 views

Maximizing Worker Thread Utilization

To solve a problem (and better my understanding of multitasking) I have written a small thread pool implementation. This thread pool spins up a number of worker threads which pop tasks off of a queue ...
fbrereto's user avatar
  • 35.8k
1 vote
1 answer
4k views

Effects of uncaught exceptions on threads from Quartz's SimpleThreadPool

Using Spring's integration api with Quartz, what will the effects be on cron jobs that have uncaught exceptions? Since the cronbean/worker thread did not catch the exception, will that mean the thread ...
Carlos Jaime C. De Leon's user avatar
0 votes
0 answers
278 views

Parallel processing in Node.js

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: Put ...
Sudhir's user avatar
  • 837
0 votes
1 answer
777 views

WCF Service with Worker Thread - how to design?

I have a WCF Service that serves some clients. The design is : WCF Service Layer Business Logic Layer Data Access Layer (LINQ-To-Entities) I need to have a worker thread that does some continuous ...
John Miner's user avatar