Well tested C/C++ lock free queue? [duplicate]
Asked Answered
S

1

8

Possible Duplicate:
Is there a production ready lock-free queue or hash implementation in C++

I am looking for a well-tested, publicly available C/C++ implementation of a lock free queue.

I need at least multiple-producers/single-consumer functionality. Multiple-consumers is even better, if exists.

I'm targetting VC's _Interlocked... intrinsics, though anything which is straight forward to port would be fine.

Could anyone give any pointers?

Schoolmate answered 27/4, 2010 at 9:7 Comment(4)
The TBB library has some lock-free containers (although I can't remember whether it comes with a queue): threadingbuildingblocks.orgNasalize
TBB has a concurrent_queue, though the docs only state that it's thread safe without mentioning lock-freeness. Anyway, TBB's license is problematic (GPL/Commercial).Schoolmate
Take a look at #1164523Outbid
Qt allows this, last time I checked. It comes with a whole whack of other stuff though (practically a whole language extension by the time QMake is done).Mockup
A
0

If you're ok to go down that route, there's always the Windows thread pool.

Anthracnose answered 28/4, 2010 at 0:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.