futex 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/futex.gemspec +1 -1
  3. data/lib/futex.rb +4 -4
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6fe725623e9222ab65747891baf33b18b02aa14b4b9839386b14b9b40689d677
4
- data.tar.gz: a56328499e4fe088514b7c4bd6c8cd79165c58f7e18ce40e12db9997e9ac580b
3
+ metadata.gz: 7ab0c6b23a6d358ef98795adc73b7b3ec9f9b9b9714dbce423b87a19199f3f00
4
+ data.tar.gz: 98866fced75a607457dcfa6895f8d0d48f06573d4c6ccb10a806b6d58569ae82
5
5
  SHA512:
6
- metadata.gz: 8bd6f3ced41b81b3e91489e09c7e796e45b6633181d520d3cf0912f7a69c28568ab3320a3007eb58210e00eb1396a72966f79050fb7ce09a13accde44d8ab2b6
7
- data.tar.gz: '091d37893523574dbb618c6ee55e9721b1e042732e87a318bd50ae2613b3dd0252aedf8ee8ecd7e48c2a24a4f0ce6b7d44edbe93cbd66a77d7041cfd90424bcd'
6
+ metadata.gz: df0638b0dd8f4cebce2ba7b20be4640f211ae2d6e22fb146cd5df1fe3671aa4a5804a6a91240826e4fc9d8a91f46052b30eed12cc8d29a82ce593df13c480acb
7
+ data.tar.gz: 224cb207f548b50f5ec0226040123dab83b89d003d97cde03dbe6eb2b92fef9c3c671994df43ae328bd3302a59322a849ccbcd84c5aec6b4cc62113656faae35
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.4.1'
34
+ s.version = '0.4.2'
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
@@ -77,13 +77,13 @@ class Futex
77
77
  sleep(@sleep)
78
78
  cycle += 1
79
79
  if Time.now - start > @timeout
80
- raise "#{badge} can't get exclusive access to the file #{@path} \
81
- because of the lock at #{@lock}, after #{age(start)} \
80
+ raise "#{badge} can't get #{exclusive ? '' : 'non-'}exclusive access \
81
+ to the file #{@path} because of the lock at #{@lock}, after #{age(start)} \
82
82
  of waiting: #{IO.read(@lock)}"
83
83
  end
84
84
  if (cycle % step).zero? && Time.now - start > @timeout / 2
85
- debug("#{badge} still waiting for \
86
- exclusive access to #{@path}, #{age(start)} already: #{IO.read(@lock)}")
85
+ debug("#{badge} still waiting for #{exclusive ? '' : 'non-'}exclusive
86
+ access to #{@path}, #{age(start)} already: #{IO.read(@lock)}")
87
87
  end
88
88
  end
89
89
  debug("Locked by #{badge} in #{age(start)}: #{@path} \
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: futex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko