From: Paul Brannan Date: 2002-12-27T01:12:28+09:00 Subject: Re: Ruby/Tk problem (Re: ANN: ruby 1.6.8) On Wed, Dec 25, 2002 at 03:58:19PM +0900, nagai@ai.kyutech.ac.jp wrote: > The current Tk.mainloop uses Tcl_DoOneEvent function with TCL_DONT_WAIT. > So, if no event is waiting, Ruby can do thread switching quickly. > But if no other thread is running, the cost of Tcl_DoOneEvent loop may be > unreasonable. > > Do you have any good idea for the problem? I think one solution is to use Tcl_SetNotifier to hook into Tcl's event system. You could then get Tcl to use rb_thread_select() instead of select(). Paul