class Guard::Jobs::PryWrapper

def _switch_to_pry

def _switch_to_pry
  th = nil
  @mutex.synchronize do
    unless @thread
      @thread = Thread.new { Pry.start }
      @thread.join(0.5) # give pry a chance to start
      th = @thread
    end
  end
  # check for nill, because it might've been killed between the mutex and
  # now
  th.join unless th.nil?
end