Skip to content

Commit f21856b

Browse files
committed
Implement a sleep between checking for results
1 parent 6f08e35 commit f21856b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/octocatalog-diff/util/parallel.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ def self.run_tasks_parallel(result, task_array, logger)
137137

138138
# Any exits?
139139
this_pid, exit_obj = Process.wait2(0, Process::WNOHANG)
140-
next unless this_pid && pidmap.key?(this_pid)
140+
unless this_pid && pidmap.key?(this_pid)
141+
sleep 0.1
142+
next
143+
end
141144

142145
index = pidmap[this_pid][:index]
143146
exitstatus = exit_obj.exitstatus

0 commit comments

Comments
 (0)