summaryrefslogtreecommitdiff
path: root/ext/socket/init.c
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-09-09 17:29:12 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-09-09 17:29:12 +0000
commit84c77c15205d57a3d50d8b29bb6d2af2ff44de77 (patch)
treea4ef2343ecfe090340d71d082b34d1b69a35ca7a /ext/socket/init.c
parent946f7fc7888f61da879c660b43e2c574aaf713eb (diff)
* ext/socket/basicsocket.c (rsock_bsock_send):
avoid unnecessary select() calls before doing I/O Patch by Eric Wong. [Feature #4538] [ruby-core:35586] * ext/socket/init.c (rsock_s_recvfrom): ditto. * ext/socket/init.c (rsock_s_accept): ditto. * ext/socket/udpsocket.c (udp_send): ditto. * io.c (io_fflush): ditto. * io.c (io_binwrite): ditto. * io.c (rb_io_syswrite): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/init.c')
-rw-r--r--ext/socket/init.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/ext/socket/init.c b/ext/socket/init.c
index 696b62d..3960a23 100644
--- a/ext/socket/init.c
+++ b/ext/socket/init.c
@@ -130,7 +130,6 @@ rsock_s_recvfrom(VALUE sock, int argc, VALUE *argv, enum sock_recv_type from)
RBASIC(str)->klass = 0;
while (rb_io_check_closed(fptr),
- rb_thread_wait_fd(arg.fd),
(slen = BLOCKING_REGION_FD(recvfrom_blocking, &arg)) < 0) {
if (!rb_io_wait_readable(fptr->fd)) {
rb_sys_fail("recvfrom(2)");
@@ -560,7 +559,6 @@ rsock_s_accept(VALUE klass, int fd, struct sockaddr *sockaddr, socklen_t *len)
arg.sockaddr = sockaddr;
arg.len = len;
retry:
- rb_thread_wait_fd(fd);
fd2 = (int)BLOCKING_REGION_FD(accept_blocking, &arg);
if (fd2 < 0) {
switch (errno) {