diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | io.c | 10 |
2 files changed, 6 insertions, 8 deletions
@@ -1,3 +1,7 @@ +Sat Dec 29 23:48:13 2007 Tanaka Akira <akr@fsij.org> + + * io.c (io_fflush): don't retry when wbuf modified by other threads. + Sat Dec 29 22:44:30 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> * re.c (rb_reg_regsub): returns the given string itself if nothing @@ -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; |