Issue #4589 has been updated by Eric Hodel.


I don't think it is appropriate to include Enumerable.  Too many methods from Enumerable seem inappropriate (or behavior would be application-specific).  For example, should #find block, or only return items that match in the Queue?  Should #reject remove items from the Queue, or only filter?

I can see differing needs depending on if the Queue has a single consumer or multiple consumers.
----------------------------------------
Feature #4589: add Queue#each() method and include Enumerable
http://redmine.ruby-lang.org/issues/4589

Author: Suraj Kurapati
Status: Open
Priority: Normal
Assignee: 
Category: lib
Target version: 


Please add a thread-safe each() method to the Queue and SizedQueue classes
which are provided by the "thread" standard library

Also mix-in the Enumerable module into those classes so we can use map/inject/etc.

Thanks for your consideration.


-- 
http://redmine.ruby-lang.org