mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* io.c (rb_io_wait_writable): don't use rb_thread_wait_fd()
because it is for waiting until io readable. * io.c (rb_io_wait_writable): always use rb_thread_fd_writable() instaed of bare rb_wait_for_single_fd(). we shouldn't ignore return value. * io.c (rb_io_wait_readable): ditto. always use rb_thread_wait_fd(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
005db82d36
commit
06dcf7840f
2 changed files with 13 additions and 8 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
Tue Dec 18 18:57:58 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
|
||||
* io.c (rb_io_wait_writable): don't use rb_thread_wait_fd()
|
||||
because it is for waiting until io readable.
|
||||
|
||||
* io.c (rb_io_wait_writable): always use rb_thread_fd_writable()
|
||||
instaed of bare rb_wait_for_single_fd(). we shouldn't ignore
|
||||
return value.
|
||||
* io.c (rb_io_wait_readable): ditto. always use rb_thread_wait_fd().
|
||||
|
||||
Tue Dec 18 18:55:33 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* thread.c (rb_thread_wait_fd_rw): fix infinite loop bug.
|
||||
|
|
10
io.c
10
io.c
|
@ -1050,14 +1050,11 @@ rb_io_wait_readable(int f)
|
|||
#if defined(ERESTART)
|
||||
case ERESTART:
|
||||
#endif
|
||||
rb_thread_wait_fd(f);
|
||||
return TRUE;
|
||||
|
||||
case EAGAIN:
|
||||
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
|
||||
case EWOULDBLOCK:
|
||||
#endif
|
||||
rb_wait_for_single_fd(f, RB_WAITFD_IN, NULL);
|
||||
rb_thread_wait_fd(f);
|
||||
return TRUE;
|
||||
|
||||
default:
|
||||
|
@ -1076,14 +1073,11 @@ rb_io_wait_writable(int f)
|
|||
#if defined(ERESTART)
|
||||
case ERESTART:
|
||||
#endif
|
||||
rb_thread_wait_fd(f);
|
||||
return TRUE;
|
||||
|
||||
case EAGAIN:
|
||||
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
|
||||
case EWOULDBLOCK:
|
||||
#endif
|
||||
rb_wait_for_single_fd(f, RB_WAITFD_OUT, NULL);
|
||||
rb_thread_fd_writable(f);
|
||||
return TRUE;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue