parallel 1.16.0 → 1.16.1
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 +5 -5
- data/lib/parallel/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9d71c7c1cb0ec5616b0e53cc1e7e04f4243046a05e43ccd3450aea7623e66a7
|
4
|
+
data.tar.gz: 0ba58d01bcc3b2150f82deccc4937e2977e1428dddf89d88ecdb99163be58540
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28b1580182981900e12c8e1e839395e6e37fce2f0d5e953931a80a92e6f4d1496abe4c626f7344194674a7432f9c0956556353a3764d5d6ff4bb9f1ca20fd813
|
7
|
+
data.tar.gz: 71740d5aea1407881bc1415cad4b959e21538df22308f609f6d5becbf3dd32cc8427057ff845b1a91614ec2da867fae8604b6495b353b7e40dc07de678500dfe
|
data/lib/parallel.rb
CHANGED
@@ -44,9 +44,10 @@ module Parallel
|
|
44
44
|
|
45
45
|
class Worker
|
46
46
|
attr_reader :pid, :read, :write
|
47
|
-
attr_accessor :thread
|
47
|
+
attr_accessor :thread, :lap
|
48
48
|
def initialize(read, write, pid)
|
49
49
|
@read, @write, @pid = read, write, pid
|
50
|
+
@lap = 0
|
50
51
|
end
|
51
52
|
|
52
53
|
def stop
|
@@ -380,9 +381,8 @@ module Parallel
|
|
380
381
|
break unless index
|
381
382
|
|
382
383
|
if options[:isolation]
|
383
|
-
lap
|
384
|
-
lap += 1
|
385
|
-
replace_worker(job_factory, workers, i, options, blk) if lap > 1
|
384
|
+
worker = replace_worker(job_factory, workers, i, options, blk) if worker.lap > 0
|
385
|
+
worker.lap += 1
|
386
386
|
worker.thread = Thread.current
|
387
387
|
end
|
388
388
|
|
@@ -414,7 +414,7 @@ module Parallel
|
|
414
414
|
options[:mutex].synchronize do
|
415
415
|
# old worker is no longer used ... stop it
|
416
416
|
worker = workers[i]
|
417
|
-
worker.stop
|
417
|
+
worker.stop
|
418
418
|
|
419
419
|
# create a new replacement worker
|
420
420
|
running = workers - [worker]
|
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.16.
|
4
|
+
version: 1.16.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: michael@grosser.it
|