Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (13 sloc) 434 Bytes
begin
require "mongo/connection"
rescue LoadError => error
raise "Missing EM-Synchrony dependency: gem install mongo"
end
# monkey-patch Mongo to use em-synchrony's socket and thread classs
silence_warnings do
class Mongo::Connection
TCPSocket = ::EventMachine::Synchrony::TCPSocket
Mutex = ::EventMachine::Synchrony::Thread::Mutex
ConditionVariable = ::EventMachine::Synchrony::Thread::ConditionVariable
end
end
Something went wrong with that request. Please try again.