futex 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/futex.gemspec +1 -1
  4. data/lib/futex.rb +5 -2
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8425c8a24f6fccfcf6c2e46f8b09948e29f01c7c7ee2268b5f6624cef1a5ae4d
4
- data.tar.gz: b0b18b16071c6605f20b7363ff7c716187db97f204bb66c9708d99f0498a8b18
3
+ metadata.gz: e89a9a954b7117d46792c48cbd5b5c123a33050321266028f70bd2fd3df0702a
4
+ data.tar.gz: 4bc7abbb6b455e073bc9fb0c5f69612ce2bcc5fc9c09e2fdf651d57af5b551a5
5
5
  SHA512:
6
- metadata.gz: 12d172ff8c17fe96052e27fd8c9ebe051fd66d7bb7dd6bf8c6f52fd4bc2d5bc4f5fc69d6da55ea9c044ccbb47d451cd12cb627d9db6fb7ab6f54d0ed78e3fd82
7
- data.tar.gz: ce255c57a86867e7826e47e1505bdce4c26a0f8b66eeec1356fa6fe7f5831668e4109d6c3bcbe9e72f3b0750da76a1a8b674bf7a550330f1c633b885821a651e
6
+ metadata.gz: f96770a733ecc3661551ddb1d99b9098610176236a06c8dcb7001f8dce2476f28cabc58f2ac1b2ff7eb4bbb061e6fb0885b3b63711f7165c14273cb283601b5c
7
+ data.tar.gz: 6a9700fef33eebaceae3caa7d07d0f7fa494a2b0cfc02187ffd5362b79bf0dd4c74c3a70d2bac8cc90e44350f73dc0c0b69992f62510d7b349e5011ce790e8a4
data/.rubocop.yml CHANGED
@@ -11,7 +11,7 @@ Metrics/AbcSize:
11
11
  Metrics/BlockLength:
12
12
  Max: 30
13
13
  Metrics/MethodLength:
14
- Max: 40
14
+ Max: 50
15
15
  Metrics/ClassLength:
16
16
  Max: 150
17
17
  Metrics/CyclomaticComplexity:
data/futex.gemspec CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
31
31
  s.rubygems_version = '2.3.3'
32
32
  s.required_ruby_version = '>=2.3'
33
33
  s.name = 'futex'
34
- s.version = '0.6.2'
34
+ s.version = '0.6.3'
35
35
  s.license = 'MIT'
36
36
  s.summary = 'File-based mutex'
37
37
  s.description = 'Ruby Gem for file-based locking'
data/lib/futex.rb CHANGED
@@ -100,10 +100,13 @@ access to #{@path}, #{age(start)} already: #{IO.read(@lock)} \
100
100
  acq = Time.now
101
101
  res = yield(@path)
102
102
  debug("Unlocked by #{b} in #{age(acq)}, #{prefix}exclusive: #{@path}")
103
- Thread.current.thread_variable_set(:futex_lock, nil)
104
- Thread.current.thread_variable_set(:futex_badge, nil)
105
103
  res
106
104
  end
105
+ ensure
106
+ Thread.current.thread_variable_set(:futex_cycle, nil)
107
+ Thread.current.thread_variable_set(:futex_time, nil)
108
+ Thread.current.thread_variable_set(:futex_lock, nil)
109
+ Thread.current.thread_variable_set(:futex_badge, nil)
107
110
  end
108
111
 
109
112
  private
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: futex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-03 00:00:00.000000000 Z
11
+ date: 2018-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest