Open carl-don-it opened 3 years ago
Hi - If the buffer introduces a lock of some kind - it will be hurtful to all uses in single-threaded designs - as these will get an uncessary lock overhead.
As a solution I suggest wrapping the non-concurrent buffer inside a concurrent buffer, and guard reads and writes to the buffer with lock calls.
the buffer should use some lock or cas to support concurrency