From: Bill Kelly Date: 2006-03-01T16:30:19+09:00 Subject: Re: Waking ruby thread on external event From: "Joel VanderWerf" > > Can the ruby thread just Thread.sleep, and wait for the C++ code to call > rb_thread_wakeup() or whatever it is that implements Thread#wakeup ? Hi - somehow i'd not seen your reply. Thanks. Hmm... VALUE rb_thread_wakeup(thread) VALUE thread; { rb_thread_t th = rb_thread_check(thread); if (th->status == THREAD_KILLED) rb_raise(rb_eThreadError, "killed thread"); rb_thread_ready(th); return thread; } I don't suppose this could be called from a different OS thread than ruby's. And the ruby interpreter may be waiting in a select() call when I need to wake up my ruby thread. Ah, well.. Maybe UDP is the way to go... Regards, Bill