From 713ecbc21d8ee6ea70bdf6ed18fc83259a21a96e Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Fri, 12 Jul 2024 10:35:19 +1200 Subject: [PATCH] Allow forwarding options to `Queue#async`. --- lib/async/queue.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/async/queue.rb b/lib/async/queue.rb index 224b2d92..47015a4a 100644 --- a/lib/async/queue.rb +++ b/lib/async/queue.rb @@ -48,9 +48,9 @@ def dequeue @items.shift end - def async(parent: (@parent or Task.current), &block) + def async(parent: (@parent or Task.current), **options, &block) while item = self.dequeue - parent.async(item, &block) + parent.async(item, **options, &block) end end