Consumers and Suppliers

Vitaly Davidovich vitalyd at
Fri Apr 5 06:17:35 PDT 2013

I'm with David on this one.  It's not that a queue is both at same time,
but rather it's neither - it's just a handoff/communication channel between

I'd say a queue can be a message sink (receives) and message source
(returns), but supplier/consumer is too close of a name to what people
typically think of in that case, and it's not the queue.

My $.02


Sent from my phone
I didn't mean that the collection was typically simultaneously a Consumer
and a Supplier, I meant that it was typically one or the other (I should
have been clearer in what I said). In my own collection library I do this
and I find it very convenient.

Sent from my iPad

On 05/04/2013, at 12:54 PM, David Holmes <david.holmes at> wrote:

> On 5/04/2013 9:51 AM, Howard Lovatt wrote:
>> If the method in Consumer was called put and the method in Supplier was
>> called take, then Queue could be retrofitted to extend both Consumer and
>> Supplier and then many collections could be Consumers and Suppliers.
>> I think this would be useful - what do others think?
> I would find that rather confusing because in the common
producer/consumer sense the producer puts things into the queue and the
consumer removes them from the queue. The queue itself is not considered to
be producer/supplier nor consumer.
> David
>>   -- Howard.

More information about the lambda-dev mailing list