Consumers and Suppliers

David Holmes david.holmes at oracle.com
Thu Apr 4 18:54:48 PDT 2013


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