mit-dci / opencbdc-tx

A transaction processor for a hypothetical, general-purpose, central bank digital currency
Other
896 stars 198 forks source link

Make blocking queue generic over the underlying queue type #163

Closed metalicjames closed 2 years ago

metalicjames commented 2 years ago

This PR refactors blocking_queue to be generic over the underlying queue type used to implement it. Previously it always used std::queue. This PR introduces an alias for an alternative which instead uses std::priority_queue. This is useful when you need a queue shared between multiple consumers and producers, but need to prioritize certain elements.