Creates a new
TimeoutHandler. You should use ::register and ::cancel instead of
creating the timeout handler directly.
# File lib/webrick/utils.rb, line 160
def initialize
@timeout_info = Hash.new
Thread.start{
while true
now = Time.now
@timeout_info.keys.each{|thread|
ary = @timeout_info[thread]
next unless ary
ary.dup.each{|info|
time, exception = *info
interrupt(thread, info.object_id, exception) if time < now
}
}
sleep 0.5
end
}
end