From: ko1@... Date: 2021-01-29T08:50:58+00:00 Subject: [ruby-core:102290] [Ruby master Feature#17327] The Queue constructor should take an initial set of items Issue #17327 has been updated by ko1 (Koichi Sasada). Assignee set to ko1 (Koichi Sasada) ---------------------------------------- Feature #17327: The Queue constructor should take an initial set of items https://bugs.ruby-lang.org/issues/17327#change-90145 * Author: chrisseaton (Chris Seaton) * Status: Open * Priority: Normal * Assignee: ko1 (Koichi Sasada) ---------------------------------------- I often create a `Queue` and then process it with a set of concurrent workers in threads. I end up writing: ```ruby q = Queue.new worklist.each do |work| q.push work end ``` I'd rather be able to write ```ruby q = Queue.new(*worklist) ``` -- https://bugs.ruby-lang.org/ Unsubscribe: