About this question

Seqlock: Optimistic Concurrency Control

Hard · concurrency · Quant Developer interview question · concurrency, lock-free, atomic, low-latency

A Seqlock (Sequence Lock) implements optimistic concurrency control using atomic sequence counters, allowing frequent readers to access data without blocking writers or acquiring heavy mutexes. This pattern ensures data consistency through versioning rather than mutual exclusion, making it ideal for scenarios where reads vastly outnumber writes. Task Implement the ConfigStore class to manage shared configuration data using the Seqlock pattern with std::atomic primitives. The class must support