Skip to main content

New answers tagged

5 votes
Accepted

Mandelbrot set visualizer using GTK4, Cairo and POSIX threads in C

Improve thread synchronization You have quite a bit of code for synchronizing the completion of the worker threads. It is more complicated than necessary, there is at least one bug, and in ...
G. Sliepen's user avatar
  • 69.3k
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: ...
G. Sliepen's user avatar
  • 69.3k
-1 votes

Thread-safe LRU Cache Implementation in Java

You have put the entire get() and put() methods inside a shared lock. Two threads cannot use this LRU cache in parallel. You can ...
Apoorv Gupta's user avatar
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. ...
J_H's user avatar
  • 42.1k

Top 50 recent answers are included