Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [multithreading]

For questions regarding multi-threading, the ability of a computer or a program to perform work concurrently or asynchronously by utilizing multiple concurrent streams of execution (generally referred to as threads).

multithreading
0 votes
0 answers
12 views

Synchronize three Threads in C++ one after the other

This is in continuation to this really nice one: https://stackoverflow.com/a/33500554/22598822. That post was for the sequence (t1 & t2) --> t3. Let's say I have a program running, and there ...
barak's user avatar
  • 23
0 votes
0 answers
3 views

Heroku DB Connection Limit hit when using Python ThreadPoolExecutor

I have a Django app hosted on Heroku. Some user requests to this app require making long-running queries to external resources. In order to get around the Heroku 30 request timeout, I created a system ...
xgf115's user avatar
  • 91
0 votes
0 answers
22 views

How to update slider simultaneously in pyqt5

I am making a music player and want to update the slider after every one second for this I am using threading module but whenever I run the file the application stops responding below is the code for ...
Zid's user avatar
  • 1
0 votes
0 answers
11 views

Why the CPU usage of process is much higher than the sum usage of those threads under the process

I have met a weird problem that the top command shows the process CPU usage is about 180%(2Cores) in Pod, but the sum of CPU usage from those threads under this process is only 120%, how can it happen ...
Xuegao Zhou's user avatar
0 votes
0 answers
21 views

Using Circuit Breaker within Virtual Threads

Our application is based on Spring Boot 3.2 and runs on JDK 21. We've gone all-in on virtual threads, and can't sing their praises enough. Tomcat handles all requests with a virtual thread pool, our ...
psyklopz's user avatar
  • 2,371
3 votes
0 answers
49 views

Can the "Stateless" State Machine be made thread-safe with external locking?

I've understood from the start that the Stateless state machine is not thread safe. But I don't need it to be as long as I have a way to fix it externally. I was under the impression that if one ...
Joe's user avatar
  • 6,337
2 votes
0 answers
48 views

Synchronizing simulation output generation and reading using producer and consumer threads in C++

Beginner level synchronization question here. There’s a lot of material on how to implement producer-consumer synchronization. I really did try all variations that I thought made sense, but none seems ...
barak's user avatar
  • 23
2 votes
2 answers
23 views

Which type of UML illustrates *static* threading aspects of a multi threaded application?

Im searching for the best suited UML diagram for illustration of the following static aspects of a multi threaded application: show the threads in the application; potentially grouped for threads ...
Ingolf Steinbach's user avatar
-5 votes
0 answers
32 views

How does context switching work in a single-threaded environment with green threads in Go? [closed]

I understand that in a single-threaded environment, meaning function should run to completion before another function can execute. However, I recently came across the concept of green threads in Go ...
Hououin_kyouma's user avatar
-1 votes
0 answers
20 views

Python threads access the same socket, one sending and one receiving, fails to detect receive data

The threads are Thread-based classes. Access to the socket is controlled via a Lock. Sending works but reception does not. There is definitely data being sent over the socket in both directions since ...
Musky's user avatar
  • 89
0 votes
0 answers
51 views

How to achieve efficient "bag of tasks" pattern in C multi-threading?

I am doing a costly computation that regards a combinatorial problem. The details of said problem are unimportant for this question, so I will omit them for now. The bulk of the time is spent on ...
Pavol's user avatar
  • 1