mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* io.c (finish_writeconv): uses rb_write_internal2 if
fptr->write_lock have. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e78d4e69fe
commit
7fbaa0bedf
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat Dec 15 14:18:44 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* io.c (finish_writeconv): uses rb_write_internal2 if
|
||||
fptr->write_lock have.
|
||||
|
||||
Sat Dec 15 13:57:08 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* thread.c (rb_mutex_owned_p): remove static.
|
||||
|
|
5
io.c
5
io.c
|
@ -3858,7 +3858,10 @@ finish_writeconv(rb_io_t *fptr, int noalloc)
|
|||
res = rb_econv_convert(fptr->writeconv, NULL, NULL, &dp, de, 0);
|
||||
while (dp-ds) {
|
||||
retry:
|
||||
r = rb_write_internal(fptr->fd, ds, dp-ds);
|
||||
if (fptr->write_lock && rb_mutex_owned_p(fptr->write_lock))
|
||||
r = rb_write_internal2(fptr->fd, ds, dp-ds);
|
||||
else
|
||||
r = rb_write_internal(fptr->fd, ds, dp-ds);
|
||||
if (r == dp-ds)
|
||||
break;
|
||||
if (0 <= r) {
|
||||
|
|
Loading…
Add table
Reference in a new issue