Boost logo

Boost :

Subject: Re: [boost] Interested in bounded buffer class for threaded producer/consumer communication?
From: Tim Blechmann (tim_at_[hidden])
Date: 2011-12-13 05:28:09


> 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.

boost.lockfree contains some producer/consumer data structures, it has a
different focus than your proposal, but it might be a building block for more
high-level data structures for inter-thread communication.

tim


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