module Servolux::Threaded
def wait( limit = nil )
number of iterations has passed since this method was called.
does not return until the activity thread has stopped, or a specific
method will return without taking any action. Otherwise, this method
Wait on the activity thread. If the thread is already stopped, this
def wait( limit = nil ) return self unless _activity_thread.running? initial_iterations = @_activity_thread.iterations loop { break unless @_activity_thread.running? break if limit and @_activity_thread.iterations > ( initial_iterations + limit ) Thread.pass } end