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
2 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
21 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
47 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
45 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
1 answer
21 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
-2 votes
0 answers
27 views

Is it possible to simultaneously execute send and recv on a socket in two different threads? [duplicate]

I am trying to write a simple TCP chat using threading and sockets in Python. And my question is, when broadcasting a message to all sockets, is it possible that the send and recv on a socket can be ...
Ves Blurable Lar's user avatar
-1 votes
0 answers
43 views

How to debug hanging notify_all() call in linux [closed]

I have an incidence where notify_all() does not seem to exit properly. Based on this answer notify_all() should return in any case. I have producer code in the following form: void producer() { ...
Luigsech Ingemar's user avatar
-2 votes
0 answers
25 views

If thread invalidates its cache after acquiring lock and flush its cache before release lock why is it necessary to make variable volatile in singleto [closed]

If thread invalidates its cache after acquiring lock and flush its cache before release lock why is it necessary to make variable volatile in singleton pattern, since thread which aquires the lock ...
notFound's user avatar
1 vote
0 answers
50 views

Spring Boot application gets stuck when virtual threads are used on Java 21

I've ran into an issue related to performance of Spring Boot 3 application with virtual threads enabled. TLDR reproduction steps: Checkout https://github.com/stsypanov/concurrency-demo Run ...
Sergey Tsypanov's user avatar
-1 votes
0 answers
16 views

Cache with multiple request [closed]

I have situation where I am maintaining a counter in cache , getting multiple requests from different servers of app trying to update that counter. How to keep the counter consistent I want a starter ...
Shivam Saxena's user avatar

15 30 50 per page