parallel 1.9.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/parallel.rb +18 -7
- 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: bbf5d8fc78e3bdf6f1d12ae80ffff41fa5e6d0ed
|
4
|
+
data.tar.gz: c1eb1b447d1c59dce453710d943d2b952d1079b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fbe56fc6a4ba0ec2df7bbdb9f16e44b08e42fc0bced3ff939a7baa128940d0afc6ae27da216ffb78dc066f55989e779198cb39137366e6988ab57ba854681cf
|
7
|
+
data.tar.gz: 1b5252fb4ec4ef143072dbd604641a5d614e16142065f1a1618f665cbc2f74074305adef81e784587ec6a582662bfde67654e0e431850cf9e31dbf0b8082b922
|
data/lib/parallel.rb
CHANGED
@@ -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
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
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
|
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.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-
|
11
|
+
date: 2016-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: michael@grosser.it
|