futex 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/futex.gemspec +1 -1
- data/lib/futex.rb +5 -2
- 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: e89a9a954b7117d46792c48cbd5b5c123a33050321266028f70bd2fd3df0702a
|
4
|
+
data.tar.gz: 4bc7abbb6b455e073bc9fb0c5f69612ce2bcc5fc9c09e2fdf651d57af5b551a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f96770a733ecc3661551ddb1d99b9098610176236a06c8dcb7001f8dce2476f28cabc58f2ac1b2ff7eb4bbb061e6fb0885b3b63711f7165c14273cb283601b5c
|
7
|
+
data.tar.gz: 6a9700fef33eebaceae3caa7d07d0f7fa494a2b0cfc02187ffd5362b79bf0dd4c74c3a70d2bac8cc90e44350f73dc0c0b69992f62510d7b349e5011ce790e8a4
|
data/.rubocop.yml
CHANGED
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.
|
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.
|
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-
|
11
|
+
date: 2018-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|