Subject: Re: [boost] Interested in bounded buffer class for threaded producer/consumer communication?
From: Robert Ramey (ramey_at_[hidden])
Date: 2011-12-12 20:43:19
André Offringa wrote:
> Hi all,
> I seem to have come across a producer/consumer situation a few times
> now, and everytime I do, I seem to want a slightly different
> functionality for a bounded buffer-kind of class that is not generally
> provided. I am looking for such a class that is also efficient for
> large amounts of data, and so I wonder if there does already exists a
> class in boost to efficiently push work between producers and
> consumers when they are running in different threads, i.e., that is thread
> safe. Asio
> seems to have a lot of communicating mechanisms, but I did not yet come
> across such a mechanism (pipe/channel/lane/unidirectional stream/bounded
> buffer... I'll call it a 'lane' for now) between two threads.
> If it does not exist yet in boost, I wonder if there is a general
> interest for such a class.
I used an example from circular_buffer library. Worked great
and only a few minutes to insert into my app.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk