返回题库

Quant Interview Practice Questions

专题
concurrency
难度
L2
来源
MyntBit

题目详情

In high-frequency trading (HFT), outbound connections to an exchange must be strictly limited to avoid penalties or disconnections. A common approach to throttle concurrent orders is using a counting semaphore to manage connection slots and queue waiting orders. Simulating this behavior ensures deterministic testing of order flow management systems across multiple exchanges. Task Implement a ConnectionThrottle class to simulate a counting semaphore for multiple exchanges.

  • ConnectionThrottle(