On Wed, Jan 18, 2023 at 4:52 AM Honey Sukesan via SG14 <sg14@lists.isocpp.org> wrote:
I would like to seek an opinion regarding boost:: interprocess:: message_queue vs boost::lockfree::queue.

Has anyone used boost::lockfree::queue or any of Boost.LockFree data structures in any embedded platforms?

I have a producer-consumer scenario involving multiple threads. Tried out a sample code using int values pushing to/consuming from the queue & analysed elapsed time between push/pop on a Linux x86. It's found boost::lockfree::queue gives better time performance results compared to boost:: interprocess:: message_queue. 

Haven't tried this on actual hardware target yet. Our hardware target is an ARM based processor running QNX RTOS.

I'm listening to Herb's CppCon talk on Lock-free programming now. 

It would be great if any of you has any other recommendations/pros or cons I need to be aware of before I fix boost::lockfree::queue rather than boost:: interprocess:: message_queue in our production code?


Have a look at https://github.com/cameron314/concurrentqueue ;)
 

--

Domagoj Šarić

Tech lead
C++ engineer

Microblink LTD
www.microblink.com