- shogi_server/timeout_queue.rb: the timeout parameter of the
constructor was not respected erroneously. This issue
has been fixed.
+2009-01-02 Daigo Moriwaki <daigo at debian dot org>
+
+ * [shogi-server]
+ - shogi_server/timeout_queue.rb: the timeout parameter of the
+ constructor was not respected erroneously. This issue
+ has been fixed.
+
2008-12-30 Daigo Moriwaki <daigo at debian dot org>
* [mk_html]
class TimeoutQueue
def initialize(timeout=20)
- @timeout = 20 # sec
+ @timeout = timeout # sec
@queue = []
@mon = Monitor.new
@cond = @mon.new_cond
end
#
- # @return :timeout if timeout
+ # @return :timeout if it timed out
#
def deq
timeout_flg = false
ret = :timeout
@mon.synchronize do
if @queue.empty?
- unless @cond.wait(15)
+ unless @cond.wait(@timeout)
#timeout
timeout_flg = true
end