diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-29 14:49:11 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-29 14:49:11 +0000 |
commit | fffd379d4459a2022eb4a208e46a034d4620dea3 (patch) | |
tree | c0f559bfbe54f78497042bebfbb8e9dfc64784fd /io.c | |
parent | 5ee7f4b0b5a015ae31bffe1b11723c9fce272866 (diff) | |
download | ruby-fffd379d4459a2022eb4a208e46a034d4620dea3.tar.gz |
* io.c (io_fflush): don't retry when wbuf modified by other threads.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -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; |