officer 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -51,7 +51,7 @@ Options:
51
51
 
52
52
  - :timeout => The number of seconds to wait for a lock to become available (default: wait forever).
53
53
  - :namespace => Prepend a namespace to each lock name (default: empty string).
54
- - :queue_max => If the lock queue length is greater than :queue_max then don't wait for the lock.
54
+ - :queue_max => If the lock queue length is greater than :queue_max then don't wait for the lock (default: infinite).
55
55
 
56
56
 
57
57
  ### Unlock
@@ -96,7 +96,7 @@ Options:
96
96
  - Returns the internal state of all the server's connections.
97
97
 
98
98
 
99
- ### Show the locks currently being held for this connection.
99
+ ### Show my locks
100
100
 
101
101
  client.my_locks
102
102
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.1
1
+ 0.7.2
@@ -84,7 +84,7 @@ module Officer
84
84
  end
85
85
 
86
86
  def disconnect
87
- @socket.close
87
+ @socket.close if @socket
88
88
  @socket = nil
89
89
  end
90
90
 
@@ -120,6 +120,8 @@ module Officer
120
120
  lock = @locks[name]
121
121
  names = @connections[connection]
122
122
 
123
+ return if lock.queue.first == connection # Don't timeout- already have the lock.
124
+
123
125
  lock.queue.delete connection
124
126
  names.delete name
125
127
 
data/officer.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{officer}
8
- s.version = "0.7.1"
8
+ s.version = "0.7.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Chad Remesch"]
12
- s.date = %q{2010-02-13}
12
+ s.date = %q{2010-02-17}
13
13
  s.default_executable = %q{officer}
14
14
  s.description = %q{Distributed lock server and client written in Ruby and EventMachine}
15
15
  s.email = %q{chad@remesch.com}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: officer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chad Remesch
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-13 00:00:00 -05:00
12
+ date: 2010-02-17 00:00:00 -05:00
13
13
  default_executable: officer
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency