parallel 1.3.4 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/parallel.rb +9 -9
- data/lib/parallel/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e788b0e4f387c4644af1b2cdf2e3807d418bcc68
|
4
|
+
data.tar.gz: 53efe316b90f9c352c02e676a602c23462969920
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c5a98ef6c7ee6fe67a2f78e8d9ff040fb9d460b920af5b7b164ec5a086e6b17ccae4f4094d1550496eec6b2ce60780a0f0ce9626d03d500dd9e8687dbbce135
|
7
|
+
data.tar.gz: 6746b969db1b1abf34c3b5fbf216b9e9f3de482fd3953c1cff36503931f5d43e2dff4897f6b9c789769a31f73d8449725c83c4a9e4973c05ded6b75e3abd786c
|
data/lib/parallel.rb
CHANGED
@@ -55,11 +55,13 @@ module Parallel
|
|
55
55
|
raise DeadWorker
|
56
56
|
end
|
57
57
|
|
58
|
-
begin
|
58
|
+
result = begin
|
59
59
|
Marshal.load(read)
|
60
60
|
rescue EOFError
|
61
61
|
raise DeadWorker
|
62
62
|
end
|
63
|
+
raise result.exception if ExceptionWrapper === result
|
64
|
+
result
|
63
65
|
end
|
64
66
|
end
|
65
67
|
|
@@ -267,20 +269,18 @@ module Parallel
|
|
267
269
|
item, index = items.next
|
268
270
|
break unless index
|
269
271
|
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
exception =
|
272
|
+
begin
|
273
|
+
results[index] = with_instrumentation item, index, options do
|
274
|
+
worker.work(items.pack(item, index))
|
275
|
+
end
|
276
|
+
rescue StandardError => e
|
277
|
+
exception = e
|
276
278
|
if Parallel::Kill === exception
|
277
279
|
(workers - [worker]).each do |w|
|
278
280
|
kill_that_thing!(w.thread)
|
279
281
|
kill_that_thing!(w.pid)
|
280
282
|
end
|
281
283
|
end
|
282
|
-
else
|
283
|
-
results[index] = output
|
284
284
|
end
|
285
285
|
end
|
286
286
|
ensure
|
data/lib/parallel/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parallel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: michael@grosser.it
|