返回题库

Quant Interview Practice Questions

专题
concurrency
难度
L1
来源
MyntBit

题目详情

In high-frequency trading systems, market data events often arrive asynchronously and must be processed sequentially by a trading strategy. A robust pattern for handling this concurrency is the producer-consumer model utilizing a thread-safe event queue. Implementing this pattern ensures safe data handoffs between network I/O threads and strategy execution threads without race conditions. Task Implement a thread-safe, blocking TradeQueue class using std::mutex and std::condition_variable. The