priority_mutex 0.0.2 → 0.0.3

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 -8
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NGRiZWMyZmJjNDY4NmM5ZGVhOWM3ODNhZTYxZTA0NGM2YTMwZWY0ZA==
4
+ ZGYxNGIzOTY3MThkYjNkY2EyMjc2MzQ5MDg0M2YxNWJjNTAwM2ZhOA==
5
5
  data.tar.gz: !binary |-
6
- Yzc4NTcxNDZjZjFiMWQ1ODFiZjI2OGVhMDU0OGJiMjZlY2I5ODhlNQ==
6
+ MmY5MzliZDUxMmVmNTczYmQ1MGQ4ZTNjOTIzNTM2NWY4ODQ0ZDQ5NQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDdlNjk5MGJhYjkzZDgzZGU4YmVhNTE0MjI5M2UyOTBhNDFhMjliYmZkYWU4
10
- MTkwYWE1NmFkYjM3NGI4NmY4NjVlZTNlNDM2ZmEyOWY1ZjU1NzU4ZDkzOWM4
11
- NjZhYzlhNDI3NGFiMGYyZWJjZGY3MjhlNjlkMTFjZTUzNGRjZjU=
9
+ NzA3N2I2MzI1MGNmMzhiNDIyMThjOTIyZTVlN2Y3NzliNjU4MzljYWQ2NmUz
10
+ YzEzYjdiNWE0YTk0NTIzMzdlZGM0MGI3ZmFjZWZhNzE2MWJhYjA0NDlhMGVi
11
+ NWQyM2RiMWU2OTk0NjMzYjAxYmMzOTFhYzRjYjU3ZDYwYTZkNzA=
12
12
  data.tar.gz: !binary |-
13
- MjczZjRlNTQxMDQ3Zjg4NTliMTdkMjQ5ZmM0ZTk2N2UwM2MyNjUwMjhlODM1
14
- MTU3NjYzNzFlMzBiOGM4MmM2Y2RlMGVjNGUyN2ViMDg5ZWJlODc1ZWNlMzFm
15
- M2U1OWY2N2NiNzEzMzczMzQ2YzdiOGQ1NTUyMmEzNzJmOGM3NWU=
13
+ YjkzNzYzMTU5MDAzZjIxNTliZjczNTAxYjdlNDc5MjNkYjBmMGM5ZmViY2Ux
14
+ NjVmOGU0YWZjODg0NGQwY2E2M2IyNDQxNTRjMjU1NmUwN2Y2OWRjOGY3MWI5
15
+ ZjlkMGYzZmEyNWE2MDM1NjgyOTYzODc3NzUyZDBiYzNmNWRlZjE=
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -73,15 +73,12 @@ private
73
73
  end
74
74
 
75
75
  def release_resource
76
- next_waiter = nil
77
-
78
76
  @pq_mutex.synchronize do
79
- @resource_active = false
80
- next_waiter = @pq.pop
81
- end
82
-
83
- if next_waiter
84
- next_waiter.resume
77
+ if next_waiter = @pq.pop
78
+ next_waiter.resume
79
+ else
80
+ @resource_active = false
81
+ end
85
82
  end
86
83
  end
87
84
 
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.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Jarema