# File lib/pry/input_lock.rb, line 76
    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 ? block.call : __with_ownership(&block)
    end