futex 0.8.4 → 0.8.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/futex.gemspec +1 -1
- data/lib/futex.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0e4abff4199f0689d0b4cd5690cff965c73ecd8d677f1462990988b2d812f95
|
4
|
+
data.tar.gz: 796906e21996515e1dda5a4e5d3e61de99214626b3940c950fff6443121a5e1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc1ea4e547ccda842801c62a758bd2b6a2705e88ce30c9a73455db238766a738c8203b8d674ab352ea12c7c700490c7178e3d69085d7bff3265a7528812c7e7c
|
7
|
+
data.tar.gz: 73c7b53cab1bc82e526cd01f9c5435de634f92fb2628367eca44bec1a82e47204ce464de48b6c39dff3897c467e360f411f93e14a550650abda7ec5950f38bcd
|
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.8.
|
34
|
+
s.version = '0.8.5'
|
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
@@ -177,7 +177,7 @@ access to #{@path}, #{age(start)} already: #{IO.read(@lock)} \
|
|
177
177
|
synchronized do |counts|
|
178
178
|
file&.close
|
179
179
|
refs = deserialize(IO.read(counts.path))
|
180
|
-
refs[path]
|
180
|
+
refs[path] = (refs[path] || 1) - 1
|
181
181
|
if refs[path].zero?
|
182
182
|
FileUtils.rm(path, force: true)
|
183
183
|
refs.delete(path)
|