multi_process 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/multi_process/group.rb +3 -3
- data/lib/multi_process/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 550774b3bb8c3f49060efc3d508f1d55a0c70924
|
4
|
+
data.tar.gz: e8bfbfe219cd440b5c7163db8cf81c8e8c1f0470
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 098592026b269f5afcee611ab82bc06863eba7795e1f7afd446d314d6f44584e14901518ff9b18e12e1b85a435d9a8238d21ac0471de0f65af10f64fd5851cdf
|
7
|
+
data.tar.gz: 87be05c69577bac776b30dcd4a009029e7591a1d9512771ce885939769340a5e79baf5d1fbc5f2c23d851a80e5c5dbfa35dbdaa4b6cc4ba47bc2f949663b19ce
|
data/lib/multi_process/group.rb
CHANGED
@@ -95,7 +95,7 @@ module MultiProcess
|
|
95
95
|
# If timeout is given process will be terminated using {#stop}
|
96
96
|
# when timeout error is raised.
|
97
97
|
#
|
98
|
-
def run(
|
98
|
+
def run(delay: nil, timeout: nil)
|
99
99
|
if partition > 0
|
100
100
|
partition.times.map do
|
101
101
|
Thread.new do
|
@@ -105,8 +105,8 @@ module MultiProcess
|
|
105
105
|
end
|
106
106
|
end.each(&:join)
|
107
107
|
else
|
108
|
-
start
|
109
|
-
wait
|
108
|
+
start delay: delay
|
109
|
+
wait timeout: timeout
|
110
110
|
end
|
111
111
|
ensure
|
112
112
|
stop
|