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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ac4872d57f53d1a1a2e557efb94d003ddaa32a6
4
- data.tar.gz: 3e2c2a98d097f07ff3814400db4ede65df8d46c0
3
+ metadata.gz: e788b0e4f387c4644af1b2cdf2e3807d418bcc68
4
+ data.tar.gz: 53efe316b90f9c352c02e676a602c23462969920
5
5
  SHA512:
6
- metadata.gz: 7acaad1d606d70f03581d8cad5abbd30366ee23a260802e2563dcd699de7a993be4672a4ff5b487b125788a09420393d79222df412ea1af0cab99d07fdb375e8
7
- data.tar.gz: dab686f70e59c3dadd0c8f15be45828041b69f6a6c7d26a5d42855e4a7000fe155c49cae733fbe1fe175fede0bbc1a4925be9f0dedea658f52075a34b0fa278a
6
+ metadata.gz: 3c5a98ef6c7ee6fe67a2f78e8d9ff040fb9d460b920af5b7b164ec5a086e6b17ccae4f4094d1550496eec6b2ce60780a0f0ce9626d03d500dd9e8687dbbce135
7
+ data.tar.gz: 6746b969db1b1abf34c3b5fbf216b9e9f3de482fd3953c1cff36503931f5d43e2dff4897f6b9c789769a31f73d8449725c83c4a9e4973c05ded6b75e3abd786c
@@ -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
- output = with_instrumentation item, index, options do
271
- worker.work(items.pack(item, index))
272
- end
273
-
274
- if ExceptionWrapper === output
275
- exception = output.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
@@ -1,3 +1,3 @@
1
1
  module Parallel
2
- VERSION = Version = '1.3.4'
2
+ VERSION = Version = '1.4.0'
3
3
  end
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.3.4
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-07 00:00:00.000000000 Z
11
+ date: 2015-02-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: michael@grosser.it