class EM::Mongo::Connection
Public Class Methods
new(host = DEFAULT_IP, port = DEFAULT_PORT, timeout = nil, opts = {})
click to toggle source
# File lib/em-synchrony/em-mongo.rb, line 30 def initialize(host = DEFAULT_IP, port = DEFAULT_PORT, timeout = nil, opts = {}) f = Fiber.current @em_connection = EMConnection.connect(host, port, timeout, opts) @db = {} # establish connection before returning EM.next_tick { f.resume } Fiber.yield end