lib/multi_process/group.rb in multi_process-0.5.1 vs lib/multi_process/group.rb in multi_process-0.5.2
- old
+ new
@@ -93,21 +93,21 @@
# {#start} will only be called if partition is zero.
#
# If timeout is given process will be terminated using {#stop}
# when timeout error is raised.
#
- def run(**kwargs)
+ def run(delay: nil, timeout: nil)
if partition > 0
partition.times.map do
Thread.new do
while (process = next_process)
process.run
end
end
end.each(&:join)
else
- start(**kwargs)
- wait(**kwargs)
+ start delay: delay
+ wait timeout: timeout
end
ensure
stop
end