Project

General

Profile

Actions

Feature #11044

closed

[PATCH] lib/net/protocol.rb (rbuf_fill): avoid exception with read_nonblock

Added by normalperson (Eric Wong) over 9 years ago. Updated over 9 years ago.

Status:
Closed
Target version:
-
[ruby-core:<unknown>]

Description

Exceptions are noisy in debug output and waste allocations.
Use "exception: false" introduced in 2.1 to return symbols for
common errors instead.

Follow-up commits will be prepared to reduce EOFError exceptions
to further quiet debug output and IO.select may be replaced by
io/wait methods if available to reduce allocations.

There's no visible API changes, so I'll commit this in a few days
unless there is an objection and then prepare follow-up patches.


Files

Actions #1

Updated by Anonymous over 9 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Applied in changeset r50219.


lib/net/protocol.rb (rbuf_fill): avoid exception with read_nonblock

Exceptions are noisy in debug output and waste allocations.
Use "exception: false" introduced in 2.1 to return symbols for
common errors instead.

Follow-up commits will be prepared to reduce EOFError exceptions
to further quiet debug output and IO.select may be replaced by
io/wait methods if available to reduce allocations.

[ruby-core:68787] [Feature #11044]

Actions

Also available in: Atom PDF

Like0
Like0