Actions
Feature #17327
closedThe Queue constructor should take an initial set of items
Feature #17327: The Queue constructor should take an initial set of items
Description
I often create a Queue and then process it with a set of concurrent workers in threads. I end up writing:
q = Queue.new worklist.each do |work| q.push work end I'd rather be able to write
q = Queue.new(*worklist) Actions