summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-29 14:49:11 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-29 14:49:11 +0000
commitfffd379d4459a2022eb4a208e46a034d4620dea3 (patch)
treec0f559bfbe54f78497042bebfbb8e9dfc64784fd /io.c
parent5ee7f4b0b5a015ae31bffe1b11723c9fce272866 (diff)
* 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.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/io.c b/io.c
index cb0a7b2853..10e8cb9dd6 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;