class Pry::InputLock

def self.for(input)

def self.for(input)
  # XXX This method leaks memory, as we never unregister an input once we
  # are done with it. Fortunately, the leak is tiny (or so we hope).  In
  # usual scenarios, we would leak the StringIO that is passed to be
  # evaluated from the command line.
  global_lock.synchronize do
    input_locks[input] ||= Pry::InputLock.new
  end
end