From: Eric Wong <normalperson@yhbt.net>
To: ruby-core@ruby-lang.org
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
Date: Thu, 1 Feb 2018 16:28:32 +0000 [thread overview]
Message-ID: <20180201162832.pevrkgarlxbkd7go@untitled> (raw)
In-Reply-To: <redmine.issue-14430.20180201125158.ca81ec6bda9ada5f@ruby-lang.org>
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.
next prev parent reply other threads:[~2018-02-01 16:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <redmine.issue-14430.20180201125158@ruby-lang.org>
2018-02-01 12:51 ` [ruby-core:85324] [Ruby trunk Feature#14430] net/http: use Socket.tcp with connect_timeout, instead of TCPSocket.open wrapped in Timeout.timeout carl.hoerberg
2018-02-01 16:28 ` Eric Wong [this message]
2018-02-02 0:35 ` [ruby-core:85331] " shevegen
2018-02-04 12:37 ` [ruby-core:85374] " carl.hoerberg
2019-11-05 13:32 ` [ruby-core:95701] [Ruby master " jean.boussier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.ruby-lang.org/en/community/mailing-lists/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180201162832.pevrkgarlxbkd7go@untitled \
--to=ruby-core@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).