On Sun, Jul 26, 2009 at 8:47 PM, KUBO Takehiro<kubo / jiubao.org> wrote:
> How about rb_thread_polling() and WaitForSingleObject(handle, 0)?

Sorry, rb_thread_polling() returns immediately if only one thread runs.
rb_thread_wait_for() should be used instead.

 =A0while ((result =3D WaitForSingleObject(handle, 0)) =3D=3D WAIT_TIMEOUT)=
 {
    struct timeval tv;
    tv.sec =3D 0;
    tv.usec =3D 100000;
 =A0 =A0rb_thread_wait_for(rv); /* sleep 0.1 second */
 =A0}