Questions tagged [multithreading]
Multi-threading related questions including technique, structure, and safety issues.
686 questions
3
votes
2
answers
128
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 ...
2
votes
4
answers
166
views
Multithreaded Game Server: Single send() or Many send()s for Game List?
I'm developing a multithreaded game server (C/TCP). I need to send a list of 50-100 available games to a console client.
Option A: Send 50-100 separate messages, using send() for every single ...
1
vote
1
answer
100
views
Handling order Id In OMS system on application level [closed]
Situation: Order Handling in OMS System: In my OMS system, orders are pushed from an online platform with a unique orderId.
Since the orderId is generated by the online platform, I cannot make it auto-...
3
votes
3
answers
641
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 ...
1
vote
1
answer
403
views
What does it mean to be "truly" asynchronous?
Reading the Proactor pattern paper, specifically this part:
I/O Completion Ports in Windows NT: The Windows NT operating system implements the Proactor pattern. Various Asynchronous Operations such ...
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
250
views
An adaptor layer for Pthread, C11, and C++11 threads compatibility
As my next spare-time project, I'm considering writing a suite of compatibility header and associated library, that eases the transition from Single Unix Specification v4 to v5 and C11/C17 to C2X. C++ ...
0
votes
1
answer
594
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 ...
10
votes
5
answers
4k
views
Writing public libraries: Should I let the consumer of the library enforce thread safety?
I'm writing a .NET library which exposes certain public APIs. Currently, I have not enforced thread safety in my library for following reasons apparent to me:
locks (Monitor.Enter and Monitor.Exit) ...
0
votes
1
answer
144
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 ...
0
votes
2
answers
1k
views
What problem does Rust's "atomic reference count" actually solve?
The Rust programming language offers a Arc atomic reference counting generic type for use in multi-threading environment, since Rc is optimized for performance in single-threaded applications, and ...
1
vote
1
answer
167
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
468
views
How to handle errors of pthreads fundamental lock und unlock functions?
I am writing a little C library for the Raspberry Pi for controlling 433MHz transmitters/receivers. While receiving data the whole application would block, so I decided to put this code into a ...
1
vote
2
answers
356
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() ...
0
votes
5
answers
1k
views
Can interpreted language be natively multithreaded?
First of all, let me clarify the terms in order to avoid any possible misunderstandings.
Language is considered to be compiled when a program written in it's source code cannot be run directly without ...