Closed jeremyevans closed 9 years ago
It should be possible to replace rb_thread_select
by rb_thread_fd_select
, according to https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/CAPI_obsolete_definitions. This should be ok for ruby >= 1.9.3.
Yes please
I say go for it and see if the tests pass.
Is it really just a drop-in replacement, or has the API changed at all?
According to the source the parameter arity and the parameter names are still the same.
Only the type fd_set
has changed to rb_fdset_t
: https://github.com/ruby/ruby/blob/e396ba84fb098812e52c6da9042e46b1ec17a82b/include/ruby/intern.h#L308-L311.
old rb_thread_select
:
https://github.com/ruby/ruby/blob/ruby_1_9_3/thread.c#L2724-L2726
int rb_thread_select(int max, fd_set * read, fd_set * write, fd_set * except, struct timeval *timeout)
new rb_thread_fd_select
https://github.com/ruby/ruby/blob/ruby_1_9_3/thread.c#L2768-L2769
int rb_thread_fd_select(int max, rb_fdset_t * read, rb_fdset_t * write, rb_fdset_t * except, struct timeval *timeout)
Any progress?
Ruby 2.2 removes
rb_thread_select
, which breaksdo_mysql
anddo_postgres
. Are there plans to update these gems for ruby 2.2, or are they considered legacy?