Sha256: 6cbba7edb9e3fd920234c1bc23e71328ea2d6a185b3f288dec6b9d6286a20dc9
Contents?: true
Size: 434 Bytes
Versions: 2
Compression:
Stored size: 434 Bytes
Contents
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
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
em-synchrony-0.3.0.beta.1 | lib/em-synchrony/mongo.rb |
em-synchrony-0.2.0 | lib/em-synchrony/mongo.rb |