Parallel
lockfree.txt
Associated article: Lock-Free Queues
Tags: C/C++ Parallel
Published source code accompanying the article by Petru Marginean in which he presents a lock-free queue where one thread can write to the queue and another read from it--at the same time without any locking. Also see LOCKFREE.ZIP.
Lock-Free Queues
By Petru Marginean
Listing One
#include <boost/thread.hpp>
#include <boost/thread/condition.hpp>
#include <boost/thread/xtime.hpp>
template <typename T>
struct WaitFreeQueue
{
void Produce(const T& t)
{
...


