def retry_until_true(wait=0.5, &block)
      EM::Timer.new(wait) do
        unless block.call
          retry_until_true(wait, &block)
        end
      end
    end
def retry_until_true(wait=0.5, &block)
      EM::Timer.new(wait) do
        unless block.call
          retry_until_true(wait, &block)
        end
      end
    end
Retry a code block until it retures true. The first attempt and
 following retries are delayed.

 @param wait [Numeric] time to delay block calls.
 @param block [Proc] to call that needs to return true.