parallel 1.9.0 → 1.10.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: 12ab9909c74851e485eb8565aec2216e9338b300
4
- data.tar.gz: 44ec37a9e9ca726a406ccd40e8f34224950ce901
3
+ metadata.gz: bbf5d8fc78e3bdf6f1d12ae80ffff41fa5e6d0ed
4
+ data.tar.gz: c1eb1b447d1c59dce453710d943d2b952d1079b3
5
5
  SHA512:
6
- metadata.gz: 2d427df65610e20fb2b7da6c572565de3c9cb6dc6fc3a5b483f41d30514675d67b47f05a51579f04ab0a384cb642b5aef272e9c682d584c9e92c43762fb0bd2a
7
- data.tar.gz: 2f48e8be3267f707ba4d43596d2489e7c54564be466a9155bbd88991e454110e8406bf247436bcca0ac12fcd1d867f2fda5741e71111b7611629e41a17f5fc12
6
+ metadata.gz: 0fbe56fc6a4ba0ec2df7bbdb9f16e44b08e42fc0bced3ff939a7baa128940d0afc6ae27da216ffb78dc066f55989e779198cb39137366e6988ab57ba854681cf
7
+ data.tar.gz: 1b5252fb4ec4ef143072dbd604641a5d614e16142065f1a1618f665cbc2f74074305adef81e784587ec6a582662bfde67654e0e431850cf9e31dbf0b8082b922
@@ -14,17 +14,28 @@ module Parallel
14
14
  class Kill < StandardError
15
15
  end
16
16
 
17
+ class UndumpableException < StandardError
18
+ def initialize(original)
19
+ super "#{original.class}: #{original.message}"
20
+ @bracktrace = original.backtrace
21
+ end
22
+
23
+ def backtrace
24
+ @bracktrace
25
+ end
26
+ end
27
+
17
28
  Stop = Object.new
18
29
 
19
30
  class ExceptionWrapper
20
31
  attr_reader :exception
21
32
  def initialize(exception)
22
- dumpable = Marshal.dump(exception) rescue nil
23
- unless dumpable
24
- exception = RuntimeError.new("Undumpable Exception -- #{exception.inspect}")
25
- end
26
-
27
- @exception = exception
33
+ @exception =
34
+ begin
35
+ Marshal.dump(exception) && exception
36
+ rescue
37
+ UndumpableException.new(exception)
38
+ end
28
39
  end
29
40
  end
30
41
 
@@ -355,7 +366,7 @@ module Parallel
355
366
  exception = e
356
367
  if Parallel::Kill === exception
357
368
  (workers - [worker]).each do |w|
358
- w.thread.kill
369
+ w.thread.kill unless w.thread.nil?
359
370
  UserInterruptHandler.kill(w.pid)
360
371
  end
361
372
  end
@@ -1,3 +1,3 @@
1
1
  module Parallel
2
- VERSION = Version = '1.9.0'
2
+ VERSION = Version = '1.10.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.9.0
4
+ version: 1.10.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: 2016-06-03 00:00:00.000000000 Z
11
+ date: 2016-11-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: michael@grosser.it