servolux 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,9 @@
1
+ == 0.6.2 / 2009-07-16
2
+
3
+ * 1 Minor Enhancement
4
+ * Added a flag to the server startup method to wait for shutdown
5
+ before returning
6
+
1
7
  == 0.6.1 / 2009-07-13
2
8
 
3
9
  * 1 Minor Enhancement
@@ -4,7 +4,7 @@ require 'logging'
4
4
  module Servolux
5
5
 
6
6
  # :stopdoc:
7
- VERSION = '0.6.1'
7
+ VERSION = '0.6.2'
8
8
  LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
9
9
  PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
10
10
  # :startdoc:
@@ -174,7 +174,12 @@ class Servolux::Server
174
174
  # shutdown the server, starting and joining the server thread. The PID
175
175
  # file is deleted when this method returns.
176
176
  #
177
- def startup
177
+ # If +true+ is passed to this method, then it will not return until the
178
+ # +wait_for_shutdown+ method has been called from another thread. This
179
+ # flag is used to ensure that the server has shutdown completely when
180
+ # shutdown by a signal.
181
+ #
182
+ def startup( wait = false )
178
183
  return self if running?
179
184
  @mutex.synchronize {
180
185
  @shutdown = ConditionVariable.new
@@ -185,6 +190,7 @@ class Servolux::Server
185
190
  trap_signals
186
191
  start
187
192
  join
193
+ wait_for_shutdown if wait
188
194
  ensure
189
195
  delete_pid_file
190
196
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: servolux
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Pease
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-13 00:00:00 -06:00
12
+ date: 2009-07-16 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency