* 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
Родитель 82b2e80120
Коммит 4da4cb0421
2 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

@ -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>
* ext/socket/init.c (wait_connectable): use rb_wait_for_single_fd().

Просмотреть файл

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