From: normalperson@... Date: 2015-06-05T23:47:05+00:00 Subject: [ruby-core:69473] [Ruby trunk - Feature #11229] [Open] [PATCH] socket: allow exception-free nonblocking sendmsg/recvmsg Issue #11229 has been reported by Eric Wong. ---------------------------------------- Feature #11229: [PATCH] socket: allow exception-free nonblocking sendmsg/recvmsg https://bugs.ruby-lang.org/issues/11229 * Author: Eric Wong * Status: Open * Priority: Normal * Assignee: Yukihiro Matsumoto ---------------------------------------- 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-------------------------------- 0001-socket-allow-exception-free-nonblocking-sendmsg-recv.patch (13.4 KB) -- https://bugs.ruby-lang.org/