Simplified mutex creation
This commit is contained in:
parent
2a0552d6dc
commit
f642b0b3bd
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
require 'socket'
|
require 'socket'
|
||||||
require 'digest/md5'
|
require 'digest/md5'
|
||||||
require 'mutex_m'
|
require 'thread'
|
||||||
require 'mongo/collection'
|
require 'mongo/collection'
|
||||||
require 'mongo/message'
|
require 'mongo/message'
|
||||||
require 'mongo/query'
|
require 'mongo/query'
|
||||||
@ -137,8 +137,7 @@ module Mongo
|
|||||||
@pk_factory = options[:pk]
|
@pk_factory = options[:pk]
|
||||||
@slave_ok = options[:slave_ok] && @nodes.length == 1 # only OK if one node
|
@slave_ok = options[:slave_ok] && @nodes.length == 1 # only OK if one node
|
||||||
@auto_reconnect = options[:auto_reconnect]
|
@auto_reconnect = options[:auto_reconnect]
|
||||||
@semaphore = Object.new
|
@semaphore = Mutex.new
|
||||||
@semaphore.extend Mutex_m
|
|
||||||
@socket = nil
|
@socket = nil
|
||||||
@logger = options[:logger]
|
@logger = options[:logger]
|
||||||
connect_to_master
|
connect_to_master
|
||||||
|
Loading…
Reference in New Issue
Block a user