From: Eric Wong Date: 2018-02-01T16:28:32+00:00 Subject: [ruby-core:85327] Re: [Ruby trunk Feature#14430] net/http: use Socket.tcp with connect_timeout, instead of TCPSocket.open wrapped in Timeout.timeout carl.hoerberg@gmail.com wrote: > Instead of using TCPSocket.open, wrapped in Timeout.timeout, > that will create a temporary thread. By using Socket.tcp with > the connect_timeout argument for open_timeout the connection > opening is much more efficient as the kernels timeout is used > instead. Unfortunately, we can't do this, yet. The Addrinfo calls use getaddrinfo(3) which doesn't support timeout natively. My goals for later this year is: 1) implement Timeout in the VM itself so it doesn't need to create a temporary thread. 2) update resolv-replace.rb to cover Addrinfo cases, including nscd cache lookup for glibc compatibility. Unsubscribe: