About this question
Medium · concurrency · Quant Developer interview question · concurrency, multithreading, low-latency, c++
High-frequency trading and market data processing systems often rely on producer-consumer queues to pass messages, such as market ticks or order updates, between threads. A bounded queue prevents memory exhaustion and provides natural back-pressure to producers when downstream consumers cannot keep up with the message rate. Task Implement a thread-safe bounded queue in C++ that processes double values. Your class BoundedQueue must provide the following methods: - BoundedQueue(int capacity): Ini