Search code examples
c++concurrencyqueuefifolock-free

Boost library or equivalent implementation of C++0x atomic for Sutter's lock-free queue?


Herb Sutter's article on lock-free and concurrent queues has been mentioned quite a bit here in SO. However, I don't have a C++0x compiler...so I'm wondering if anyone has translated his code to use either some boost library or whatever to provide some "atomic" operation.

I wouldn't mind, even, if anyone can provide a mutex/condition_variable example...

Here are the articles I'm referring to...

http://drdobbs.com/cpp/210604448

http://drdobbs.com/cpp/211601363

http://drdobbs.com/high-performance-computing/212201163

Thanks!


Solution

  • Intel's Thread Building Blocks has an atomic data structure.

    The Boost Thread library is also a good place to find various mutexes and condition variables.