lib/async/container/group.rb in async-container-0.17.1 vs lib/async/container/group.rb in async-container-0.18.0

- old
+ new

@@ -18,10 +18,14 @@ # This queue allows us to wait for processes to complete, without spawning new processes as a result. @queue = nil end + def inspect + "#<#{self.class} running=#{@running.size}>" + end + # @attribute [Hash(IO, Fiber)] the running tasks, indexed by IO. attr :running # Whether the group contains any running processes. # @returns [Boolean] @@ -131,9 +135,10 @@ end protected def wait_for_children(duration = nil) + Console.debug(self, "Waiting for children...", duration: duration) if !@running.empty? # Maybe consider using a proper event loop here: readable, _, _ = ::IO.select(@running.keys, nil, nil, duration) readable&.each do |io|