1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/readline/readline.c (readline_event): use rb_wait_for_single_fd().

The patch was written by Eric Wong. [Ruby 1.9 - Feature #4531]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kosaki 2011-05-04 01:13:02 +00:00
parent 82b2e80120
commit 4da4cb0421
2 changed files with 6 additions and 5 deletions

View file

@ -1,3 +1,8 @@
Wed May 4 10:12:39 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* ext/readline/readline.c (readline_event): use rb_wait_for_single_fd().
The patch was written by Eric Wong. [Ruby 1.9 - Feature #4531]
Wed May 4 10:10:28 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com> Wed May 4 10:10:28 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* ext/socket/init.c (wait_connectable): use rb_wait_for_single_fd(). * ext/socket/init.c (wait_connectable): use rb_wait_for_single_fd().

View file

@ -145,11 +145,7 @@ readline_event(void)
#if BUSY_WAIT #if BUSY_WAIT
rb_thread_schedule(); rb_thread_schedule();
#else #else
rb_fdset_t fds; rb_wait_for_single_fd(fileno(rl_instream), RB_WAITFD_IN, NULL);
rb_fd_init(fds);
rb_fd_set(fileno(rl_instream), &fds);
rb_thread_fd_select(fileno(rl_instream) + 1, &fds, NULL, NULL, NULL);
return 0; return 0;
#endif #endif
} }