roc-streaming / roc-toolkit

Real-time audio streaming over the network.
https://roc-streaming.org
Mozilla Public License 2.0
1.03k stars 205 forks source link

Extract MpscQueueImpl class from MpscQueue class #580

Closed gavv closed 9 months ago

gavv commented 9 months ago

core::MpscQueue implements intrusive lock-free queue. It is rather big template class.

To reduce code size and compilation times, it would be great to extract most of its internals to a non-template implementation class. All existing code will continue using MpscQueue, however its methods will mostly just invoke similar methods of MpscQueueImpl and make some type casts. This way, the template part will be small, and non-template part will be compiled once and reused.

We use the same approach with core::Pool and core::PoolImpl.

nolan-veed commented 9 months ago

I'll do.

gavv commented 9 months ago

Great!

gavv commented 9 months ago

Merged