mirror of
https://github.com/ruby/ruby.git
synced 2025-09-19 18:43:59 +02:00
Merge RubyGems-3.2.13 and Bundler-2.2.13
This commit is contained in:
parent
06cd5711e0
commit
7efc7afcae
24 changed files with 477 additions and 267 deletions
|
@ -13,12 +13,13 @@ module CoreExtensions
|
|||
def initialize(host, serv, *rest)
|
||||
mutex = Mutex.new
|
||||
addrs = []
|
||||
threads = []
|
||||
cond_var = ConditionVariable.new
|
||||
|
||||
Addrinfo.foreach(host, serv, nil, :STREAM) do |addr|
|
||||
Thread.report_on_exception = false if defined? Thread.report_on_exception = ()
|
||||
|
||||
Thread.new(addr) do
|
||||
threads << Thread.new(addr) do
|
||||
# give head start to ipv6 addresses
|
||||
sleep IPV4_DELAY_SECONDS if addr.ipv4?
|
||||
|
||||
|
@ -40,6 +41,8 @@ module CoreExtensions
|
|||
host = addrs.shift unless addrs.empty?
|
||||
end
|
||||
|
||||
threads.each {|t| t.kill.join if t.alive? }
|
||||
|
||||
super(host, serv, *rest)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue