Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-08-13 15:08:11


From: "Alexander Terekhov" <terekhov_at_[hidden]>

> > > > synchronized_queue<int> q;
> >
> > Actually the queue need not even be synchronized. :-)
>
> really ? and how do you prevent concurrent push/empty/pop ??

Assuming a single producer/single consumer scenario, the queue need not have
an associated synchronization primitive, since empty and pop can be made to
work even while another thread is push'ing. I think. :-) An std::queue
wouldn't work, of course.

--
Peter Dimov
Multi Media Ltd.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk