PB> The way I handle this is with an ACE reactor; the reactor is wrapped so
PB> I can add Ruby IO objects to the reactor.  99% of the time, my
PB> application is sitting inside the reactor event loop.  When data is
PB> available on an fd, a callback is made, either into C++ code or Ruby
PB> code, depending on who registered the fd.  Ruby threads can be running
PB> in the background while the reactor is sitting in an rb_thread_select
PB> loop.

PB> If a callback hangs, then the program will hang, but if a background
PB> thread hangs, then I'm still safe.

That sounds quite useful.  Do you have any examples of using reactor
with ruby publicly available?

thanks,
-joe