ruby-changes:3289
From: ko1@a...
Date: 29 Dec 2007 23:49:22 +0900
Subject: [ruby-changes:3289] akr - Ruby:r14783 (trunk): * io.c (io_fflush): don't retry when wbuf modified by other threads.
akr 2007-12-29 23:49:11 +0900 (Sat, 29 Dec 2007) New Revision: 14783 Modified files: trunk/ChangeLog trunk/io.c Log: * io.c (io_fflush): don't retry when wbuf modified by other threads. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14783&r2=14782 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/io.c?r1=14783&r2=14782 Index: ChangeLog =================================================================== --- ChangeLog (revision 14782) +++ ChangeLog (revision 14783) @@ -1,3 +1,7 @@ +Sat Dec 29 23:48:13 2007 Tanaka Akira <akr@f...> + + * io.c (io_fflush): don't retry when wbuf modified by other threads. + Sat Dec 29 22:44:30 2007 Nobuyoshi Nakada <nobu@r...> * re.c (rb_reg_regsub): returns the given string itself if nothing Index: io.c =================================================================== --- io.c (revision 14782) +++ io.c (revision 14783) @@ -545,14 +545,8 @@ 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml