Project

General

Profile

Actions

Feature #11229

closed

[PATCH] socket: allow exception-free nonblocking sendmsg/recvmsg

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

Status:
Closed
Target version:
-
[ruby-core:69473]

Description

As documented before, exceptions are expensive and IO::Wait*able are too
common in socket applications to be the exceptional case. Datagram
sockets deserve the same API which stream sockets are allowed with
read_nonblock and write_nonblock.

Note: this does not offer a performance advantage under optimal
conditions when both ends are equally matched in speed, but it it
does make debug output cleaner by avoiding exceptions whenever
the receiver slows down.

I think I have only one more change I'd like to add for recv/recvmsg* APIs
in the future: destination buffers to reduce GC overhead


Files

Actions

Also available in: Atom PDF

Like0
Like0Like0