Consumers and Suppliers
howard.lovatt at gmail.com
Fri Apr 5 00:15:12 PDT 2013
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 oracle.com> 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.
>> -- Howard.
More information about the lambda-dev