priority_mutex 0.0.3 → 0.0.4

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 +8 -8
  2. data/VERSION +1 -1
  3. data/lib/priority_mutex.rb +5 -2
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZGYxNGIzOTY3MThkYjNkY2EyMjc2MzQ5MDg0M2YxNWJjNTAwM2ZhOA==
4
+ NTNlMjQ4ZWRmZWQ4NWM1Yzc2N2VjOTI1ZjIwYTNhOTFkMTExNmEwZg==
5
5
  data.tar.gz: !binary |-
6
- MmY5MzliZDUxMmVmNTczYmQ1MGQ4ZTNjOTIzNTM2NWY4ODQ0ZDQ5NQ==
6
+ ZTQ4M2U0N2ZlYjQ1N2E2MDc4OTEwZWQwZjQ1ODZiNzE5OTI1ZTI4ZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NzA3N2I2MzI1MGNmMzhiNDIyMThjOTIyZTVlN2Y3NzliNjU4MzljYWQ2NmUz
10
- YzEzYjdiNWE0YTk0NTIzMzdlZGM0MGI3ZmFjZWZhNzE2MWJhYjA0NDlhMGVi
11
- NWQyM2RiMWU2OTk0NjMzYjAxYmMzOTFhYzRjYjU3ZDYwYTZkNzA=
9
+ YzY3ZjUwY2M0MThhZjAwZjM5NTE2MDMzYTlhYmJhYmJhYzZjNTRmYzU4ZmNh
10
+ MWM5YmFlNTE0ODVmMjRhZTEyY2Q3YzExM2U0YzA5YWI3YjBiMDI2MWQyNmUz
11
+ NjQ5MGRmZGUxY2Y2NDYyNTBjNDM2Y2M5OWE2MjQ4MDRlZmQyMGU=
12
12
  data.tar.gz: !binary |-
13
- YjkzNzYzMTU5MDAzZjIxNTliZjczNTAxYjdlNDc5MjNkYjBmMGM5ZmViY2Ux
14
- NjVmOGU0YWZjODg0NGQwY2E2M2IyNDQxNTRjMjU1NmUwN2Y2OWRjOGY3MWI5
15
- ZjlkMGYzZmEyNWE2MDM1NjgyOTYzODc3NzUyZDBiYzNmNWRlZjE=
13
+ NjcyMjAyMzRiOGVkOWU5Nzk4NTFlMDU5NTA0ZjJlODM3MmMyMGI2OGMyMzll
14
+ ZjFlNjJmZTY0ZDMyYmQzMWRlZDU3NzE2ODg4YmQ5Njc3Y2RhYzg3YTRmNzVh
15
+ YWRmYzJlY2JjNDQwNzEyOWM2Y2IyZTY5MmYyMzMxNjNjM2QyMDI=
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
@@ -40,8 +40,11 @@ class PriorityMutex
40
40
 
41
41
  def synchronize(priority = 0)
42
42
  wait_for_resource_if_necessary(priority)
43
- yield
44
- release_resource
43
+ begin
44
+ yield
45
+ ensure
46
+ release_resource rescue nil
47
+ end
45
48
  end
46
49
 
47
50
  def locked?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: priority_mutex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Jarema