Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
DRb::DRbConn.make_pool
make_pool
lib/drb/drb.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/lib/drb/drb.rb, line 1259
def self.make_pool
ThreadObject.new do |queue|
pool = []
while true
queue._execute do |message|
case(message[0])
when :take then
remote_uri = message[1]
conn = nil
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
conn
when :store then
conn = message[1]
pool.unshift(conn)
pool.pop.close while pool.size > POOL_SIZE
conn
else
nil
end
end
end
end
end
No documentation available