KUBO Takehiro
4/4/2009 8:48:00 AM
Hi,
On Thu, Apr 2, 2009 at 11:34 PM, Praveen <praveendevarao@gmail.com> wrote:
> ... Also this link
> says the type of parameter the unblocking fucntion expects is
> rb_thread_t * , so who will be passing this thread reference.
No. It depends on the type of the unblocking function.
The forth parameter of rb_thread_blocking_region is passed to the
unblocking function
as it is. Exceptionally when RUBY_UBF_IO or RUBY_UBF_PROCESS is passed to
the third parameter, the fourth is ignored.
Indeed ubf_select in thread_pthread.c and thread_win32.c expects rb_thread_t*.
But you have no need to pass it. It is set by rb_thread_blocking_region when
RUBY_UBF_IO or RUBY_UBF_PROCESS is passed.