Method: Mongo::Server::ConnectionPool#do_pause

Defined in:
lib/mongo/server/connection_pool.rb

#do_pauseObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Mark the connection pool as paused without acquiring the lock.

Since:

  • 2.0.0, largely rewritten in 2.9.0



493
494
495
496
497
498
499
500
501
# File 'lib/mongo/server/connection_pool.rb', line 493

def do_pause
  if Lint.enabled? && !@server.unknown?
    raise Error::LintError, "Attempting to pause pool for server #{@server.summary} which is known"
  end

  return if !@ready

  @ready = false
end