From f81eabe7ef4ce49b2d946483879e9273802fdace Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 29 Dec 2007 14:49:11 +0000 Subject: * io.c (io_fflush): don't retry when wbuf modified by other threads. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ io.c | 10 ++-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 29a570465..2356181fd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat Dec 29 23:48:13 2007 Tanaka Akira + + * io.c (io_fflush): don't retry when wbuf modified by other threads. + Sat Dec 29 22:44:30 2007 Nobuyoshi Nakada * re.c (rb_reg_regsub): returns the given string itself if nothing diff --git a/io.c b/io.c index cb0a7b285..10e8cb9dd 100644 --- a/io.c +++ b/io.c @@ -545,14 +545,8 @@ io_fflush(rb_io_t *fptr) l = PIPE_BUF; } r = rb_write_internal(fptr->fd, fptr->wbuf+wbuf_off, l); - if (wbuf_off != fptr->wbuf_off || fptr->wbuf_len < wbuf_len) { - /* xxx: Other threads modified wbuf in non-append operation. - * This condition can be false negative if other threads - * flush this IO and fill the buffer. - * A lock is required, definitely. - */ - goto retry; - } + /* xxx: Other threads modified wbuf in non-append operation. + * A lock is required, definitely. */ rb_io_check_closed(fptr); if (fptr->wbuf_len <= r) { fptr->wbuf_off = 0; -- cgit