ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: shevegen@gmail.com
To: ruby-core@ruby-lang.org
Subject: [ruby-core:85331] [Ruby trunk Feature#14430] net/http: use Socket.tcp with connect_timeout, instead of TCPSocket.open wrapped in Timeout.timeout
Date: Fri, 02 Feb 2018 00:35:19 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-70117.20180202003517.9487b958071fe20c@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-14430.20180201125158@ruby-lang.org

Issue #14430 has been updated by shevegen (Robert A. Heiler).


> implement Timeout in the VM itself so it doesn't need
> to create a temporary thread.

There be dragons hiding in the VM.

\o/

----------------------------------------
Feature #14430: net/http: use Socket.tcp with connect_timeout, instead of TCPSocket.open wrapped in Timeout.timeout
https://bugs.ruby-lang.org/issues/14430#change-70117

* Author: carl.hoerberg (Carl Hörberg)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
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. 

PR at: https://github.com/ruby/ruby/pull/1806



-- 
https://bugs.ruby-lang.org/

  parent reply	other threads:[~2018-02-02  0:35 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   ` [ruby-core:85327] " Eric Wong
2018-02-02  0:35 ` shevegen [this message]
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=redmine.journal-70117.20180202003517.9487b958071fe20c@ruby-lang.org \
    --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).