search for: rb_cthread

Displaying 1 result from an estimated 1 matches for "rb_cthread".

2006 Dec 07
0
Fwd: win32-service problems with patch
...} + + return self; +} + +static VALUE +daemon_mainloop_ensure(VALUE self) +{ + int i; + + // signal both the ruby thread and service_main thread to terminate + SetEvent(hStopEvent); + + // wait for ALL ruby threads to exit + + for(i=1;TRUE;i++) + { + VALUE list = rb_funcall(rb_cThread, rb_intern("list"), 0); + + { + char buf[80]; + sprintf(buf, "num_threads = %u\n", RARRAY(list)->len); + } + + if (RARRAY(list)->len <= 1) + break; + + // This is another ugly polling loop, be as polite as possible + rb_thre...