Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-02-13 03:23:45


John Fuller wrote:

> both Ted Yuan's producer-consumer templates (cujjan2004)
> and the synchronized template
> at http://libcalc.sourceforge.net/synchronized.hpp
> are nice thread-safe container implementations...

I could not find the first reference. Looking at the second, it seems to
implement the same idea as Raoul Gough's presented. And of course, I'll ask
the same question: if I have code like

        if (!proxy->empty()) {
            int value = proxy->front();
            //....
        }

what prevents other thread from extracting all elements between the two
calls?

- Volodya

   


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