parallel 1.18.0 → 1.19.2
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 +10 -6
- data/lib/parallel/version.rb +1 -1
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5633042712162c3ac1b37b31f546cf70eb45513bc78c2180a5009c8d5a1826a
|
4
|
+
data.tar.gz: 621b9b2dfa7d8d67494da0ff0ad82c14d67d7e8b11fd73e14fe3b38e7aeaccab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7de2bb3f72d999e4eacfe84ff8df6ece7d62e60e044ba512fe11d38f2597a53f5c4ccbd0399a9e531184b8e17b25b7671be61d6ef63d739767fcf77bd9808933
|
7
|
+
data.tar.gz: 76adaacedc029a347231d1690913a2eaccce021e99e80e94a59685a418e617144ad65077d77cc87fd01a3a9cf7a6a4a6250fc2792a3b54f303ef4d99929c4e98
|
data/lib/parallel.rb
CHANGED
@@ -201,14 +201,15 @@ module Parallel
|
|
201
201
|
|
202
202
|
class << self
|
203
203
|
def in_threads(options={:count => 2})
|
204
|
+
threads = []
|
205
|
+
count, _ = extract_count_from_options(options)
|
206
|
+
|
204
207
|
Thread.handle_interrupt(Exception => :never) do
|
205
208
|
begin
|
206
|
-
threads = []
|
207
|
-
count, _ = extract_count_from_options(options)
|
208
|
-
count.times do |i|
|
209
|
-
threads << Thread.new { yield(i) }
|
210
|
-
end
|
211
209
|
Thread.handle_interrupt(Exception => :immediate) do
|
210
|
+
count.times do |i|
|
211
|
+
threads << Thread.new { yield(i) }
|
212
|
+
end
|
212
213
|
threads.map(&:value)
|
213
214
|
end
|
214
215
|
ensure
|
@@ -469,7 +470,10 @@ module Parallel
|
|
469
470
|
item, index = job_factory.unpack(data)
|
470
471
|
result = begin
|
471
472
|
call_with_index(item, index, options, &block)
|
472
|
-
|
473
|
+
# https://github.com/rspec/rspec-support/blob/673133cdd13b17077b3d88ece8d7380821f8d7dc/lib/rspec/support.rb#L132-L140
|
474
|
+
rescue NoMemoryError, SignalException, Interrupt, SystemExit
|
475
|
+
raise $!
|
476
|
+
rescue Exception
|
473
477
|
ExceptionWrapper.new($!)
|
474
478
|
end
|
475
479
|
begin
|
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.19.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: michael@grosser.it
|
@@ -23,7 +23,11 @@ files:
|
|
23
23
|
homepage: https://github.com/grosser/parallel
|
24
24
|
licenses:
|
25
25
|
- MIT
|
26
|
-
metadata:
|
26
|
+
metadata:
|
27
|
+
bug_tracker_uri: https://github.com/grosser/parallel/issues
|
28
|
+
documentation_uri: https://github.com/grosser/parallel/blob/v1.19.2/Readme.md
|
29
|
+
source_code_uri: https://github.com/grosser/parallel/tree/v1.19.2
|
30
|
+
wiki_uri: https://github.com/grosser/parallel/wiki
|
27
31
|
post_install_message:
|
28
32
|
rdoc_options: []
|
29
33
|
require_paths:
|
@@ -39,7 +43,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
39
43
|
- !ruby/object:Gem::Version
|
40
44
|
version: '0'
|
41
45
|
requirements: []
|
42
|
-
rubygems_version: 3.
|
46
|
+
rubygems_version: 3.1.3
|
43
47
|
signing_key:
|
44
48
|
specification_version: 4
|
45
49
|
summary: Run any kind of code in parallel processes
|