method
open
open(remote_uri)
public
Hide source
# File lib/drb/drb.rb, line 1209 def self.open(remote_uri) # :nodoc: begin conn = nil @mutex.synchronize do #FIXME new_pool = [] @pool.each do |c| if conn.nil? and c.uri == remote_uri conn = c if c.alive? else new_pool.push c end end @pool = new_pool end conn = self.new(remote_uri) unless conn succ, result = yield(conn) return succ, result ensure if conn if succ @mutex.synchronize do @pool.unshift(conn) @pool.pop.close while @pool.size > POOL_SIZE end else conn.close end end end end