class Pry::InputLock
def with_ownership(&block)
def with_ownership(&block) # If we are in a nested with_ownership() call (nested pry context), we do nothing. nested = @mutex.synchronize { @owners.include?(Thread.current) } nested ? yield : __with_ownership(&block) end