parallel 1.16.1 → 1.16.2

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
  SHA256:
3
- metadata.gz: b9d71c7c1cb0ec5616b0e53cc1e7e04f4243046a05e43ccd3450aea7623e66a7
4
- data.tar.gz: 0ba58d01bcc3b2150f82deccc4937e2977e1428dddf89d88ecdb99163be58540
3
+ metadata.gz: 8b37ab79cd4bc5553a9663242658e3ebe5176b012ab8249507769cdd033a1647
4
+ data.tar.gz: e2cd38e24a3599200c0ed28e18ad1a7892d6f9f44b1d4745e0f94f65efd16339
5
5
  SHA512:
6
- metadata.gz: 28b1580182981900e12c8e1e839395e6e37fce2f0d5e953931a80a92e6f4d1496abe4c626f7344194674a7432f9c0956556353a3764d5d6ff4bb9f1ca20fd813
7
- data.tar.gz: 71740d5aea1407881bc1415cad4b959e21538df22308f609f6d5becbf3dd32cc8427057ff845b1a91614ec2da867fae8604b6495b353b7e40dc07de678500dfe
6
+ metadata.gz: dbe5f61e9cb9c58d6a4e3c415d52943fbcff5ecc184a56ed1b0732806b6aea79276dacbf602c5bdadcdfafcdbab64e2c12cc9b8d04a7c6c7c889b9f501b519df
7
+ data.tar.gz: e6349716635198a4c33830d1f4812bb84a7d32116ecfde98471808fe475ecae8231485d26e56282cae6b58b85fb0d604ef88eea04ef84b58be8dbbe8b416a564
@@ -44,10 +44,9 @@ module Parallel
44
44
 
45
45
  class Worker
46
46
  attr_reader :pid, :read, :write
47
- attr_accessor :thread, :lap
47
+ attr_accessor :thread
48
48
  def initialize(read, write, pid)
49
49
  @read, @write, @pid = read, write, pid
50
- @lap = 0
51
50
  end
52
51
 
53
52
  def stop
@@ -373,6 +372,7 @@ module Parallel
373
372
  in_threads(options) do |i|
374
373
  worker = workers[i]
375
374
  worker.thread = Thread.current
375
+ worked = false
376
376
 
377
377
  begin
378
378
  loop do
@@ -381,8 +381,8 @@ module Parallel
381
381
  break unless index
382
382
 
383
383
  if options[:isolation]
384
- worker = replace_worker(job_factory, workers, i, options, blk) if worker.lap > 0
385
- worker.lap += 1
384
+ worker = replace_worker(job_factory, workers, i, options, blk) if worked
385
+ worked = true
386
386
  worker.thread = Thread.current
387
387
  end
388
388
 
@@ -1,3 +1,3 @@
1
1
  module Parallel
2
- VERSION = Version = '1.16.1'
2
+ VERSION = Version = '1.16.2'
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.16.1
4
+ version: 1.16.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: 2019-03-28 00:00:00.000000000 Z
11
+ date: 2019-03-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: michael@grosser.it