Moved thread and socket classes into Connection for easy overriding.
This is necessary for use under em-synchrony, which uses Fibers instead of Threads and EventMachine instead of blocking sockets.
This commit is contained in:
parent
02a0c7c2dc
commit
dfcf8d9d60
|
@ -24,6 +24,9 @@ module Mongo
|
|||
|
||||
# Instantiates and manages connections to MongoDB.
|
||||
class Connection
|
||||
TCPSocket = ::TCPSocket
|
||||
Mutex = ::Mutex
|
||||
ConditionVariable = ::ConditionVariable
|
||||
|
||||
# Abort connections if a ConnectionError is raised.
|
||||
Thread.abort_on_exception = true
|
||||
|
|
Loading…
Reference in New Issue