8
votes
Accepted
Implementing a mutex-free thread safe scheme for protecting a object
It's not safe
Consider the following order in which the two threads execute:
...
7
votes
Accepted
API having flow - normal flow along with background poller(it also involves events which is not shown here)
durability
makes an entry to the DB
Good.
I'm going to assume it is postgres, MariaDB, or some similarly scalable RDBMS.
That is, we have ACID guarantees rather than a Valkey or NoSQL backend.
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
multithreading × 1627java × 459
c++ × 440
c# × 348
thread-safety × 260
python × 189
performance × 183
c++11 × 139
concurrency × 137
c × 87
queue × 71
locking × 66
python-3.x × 63
.net × 62
producer-consumer × 57
socket × 51
asynchronous × 48
beginner × 46
algorithm × 40
pthreads × 39
lock-free × 36
object-oriented × 34
networking × 34
android × 30
c++14 × 27