Questions tagged [multithreading]
Multi-threading related questions including technique, structure, and safety issues.
687 questions
1 vote
1 answer
31 views
Multi processing or multi threading for pywinauto?
I am trying to automate an old GUI tool which requires filling in some data from a CSV and selecting appropriate tree item values based on it. I need to do this in multiple instances of the ...
-1 votes
0 answers
45 views
Mutex protects client list but does not prevent socket closure in multithreaded C server [closed]
I am implementing a multithreaded C server where clients are stored in a linked list of structs. Each struct contains, among other fields, the socket (sk) for communicating with the client. The list ...
3 votes
3 answers
629 views
How can single thread execution speed further increase since frequency stagnates?
What are things that newer CPU can do to speed up single thread execution? multiple registers? (can compilers always benefit from it?) SIMD? (do compilers use SIMD without code annotation?) does a ...
4 votes
10 answers
4k views
Can multi-threading improve performance of an IO-bound process?
I am trying to understand the difference between CPU Bound vs IO Bound process. ChatGPT suggested that multi-threading/parallel processing can help a CPU bound process; However, I think that having ...
0 votes
1 answer
587 views
Global Variables State Management
Background: I am working in a Java environment using Spring Boot, where I often encounter scenarios where global variable state management is critical, especially within singleton services. I have ...
0 votes
1 answer
142 views
In Java's Fork/Join is the operation for combining results limited to addition?
As I understand it, the join() method merge/composes/combines the results from all subtasks. A simple example I saw was summing the numbers from 1 to N and the subtasks would simply sum a range of ...
1 vote
1 answer
160 views
Non blocking algorithm for invalidating and reloading cache in concurrent environment using Redis (with Redisson)
I'm trying to come up with a peace of code that would fetch centralised cache shared across multiple threads/app instances. Callers might come in swarms. The data is a large set, reads during ...
1 vote
2 answers
345 views
Maintaining locks across abstraction
Over and over I am faced with a similar problem: I have to perform two actions that are mostly unrelated, except that they need to share a mutex lock, at least for a moment. For example: void action() ...