Category "multithreading"

How is CONDITION_VARIABLE implemented?

A longer version of the title question would be: On my machine, sizeof(std::condition_variable) is 72 bytes. What are these 72 bytes used for? Note: The size

ROS Error. "Error processing request: signal only works in main thread"

I am working with Robot Operating System (ROS) and am attempting to make a server/client where the server will boot up ROS nodes that are specified by the clien

Why is HANDLE event object assumed valid in thread function?

Why is HANDLE event object(synchronization object which is created by CreateEvent function) in winapi assumed to be valid in thread function? From multithreadin

Handling Events from a Service running in a Task in an AKKA.NET actor

I'm using the Prism framework for my WPF application. I have a producer service that runs in a Task and raises a CompositePresentationEvent when a file is found

Join multiple threads with timeout

I need to join multiple threads with a timeout. Something like Thread.join(long millis) but for multiple threads. I found some posts about joining multiple thr

SDL2 rendering with multithreading on Raspberry Pi 2

So, we're trying to build a Real-Time System with preemption within a process, executing each task as a separate thread. To build the GUI, SDL was the library c

Do we need to call awaitTermination on ScheduledExecutorService?

I am new to Java multithreading. I have thousands of scheduled tasks/threads that I need to be executed. I am using the following code: ScheduledExecutorSerivce

Do I need synchronization if I reference objects from other thread to AWT thread?

Does SwingUtilities.invokeLater provides synchronization? Example: public class Threads { public static void main(String[] args) { new Thread(new Ru

Python OpenCV streaming from camera - multithreading, timestamps

I ran simple python script on Raspberry Pi 3. This script is responsible to open video device and stream data (800x600) to HTTP endpoint using MJPEG. When I rec

Calling grpc server from multi-threaded client

I have a client side code, which is multi-threaded, calling updateInfo rpc method to the grpc server to update the information(Eventually will updata data in SQ

What exactly makes Java Virtual Threads better

I am pretty hyped for Project Loom, but there is one thing that I can't fully understand. Most Java servers use thread pools with a certain limit of threads (20

During thread contention how can I speed up this ConcurrentQueue implementation which uses ReaderWriterLockSlim over a regular Queue<T>

Question: How can I implement a faster thread safe queue to support an object pool when under heavy thread contention? Scenario: My overall final objective is a

Does user level threads take advantage of multiprocessing?

Does user level threads take advantage of multiprocessing ? I read one such answer here. But, it's not clear though. What does it mean by "user threads cannot

Getting STA error when try to open OpenFileDialog box in Excel addin project

I have created Excel addin project using Visual Studio to insert a data into database. The problem is I'm unable to open a File upload box in this. I am getting

Is Node.js worker_threads module truly threads or just processes with IPC?

Recent Node.js versions contain the new module worker_threads which is said to bring multi-threading to Node.js. However, it seems using processes underhood: ht

What is disadvantage of calling sleep() inside mutex lock?

For example: pthread_mutex_lock(); //Do something sleep(1); //causes issues waiting while holding lock pthread_mutex_unlock(); what is the so

How to set threading mode in SQLite with Entity Framework?

I'm using SQLite with Entity Framework Core (RC1). I read, that SQLite supports three different threading modes: Single-thread, Multi-thread and Serialized.

If async-await doesn't create any additional threads, then how does it make applications responsive?

Time and time again, I see it said that using async-await doesn't create any additional threads. That doesn't make sense because the only ways that a computer c

Why is this singleton implementation "not thread safe"?

1. The @Singleton decorator I found an elegant way to decorate a Python class to make it a singleton. The class can only produce one object. Each Instance() ca

How to run multiple threads in C++ code

I'm a beginner for c++. I wrote a program to extract data from one DB and store those data to another DB. I just want to add multiple threads to speed up the pr