From: nagai@... Date: 2002-04-26T12:12:26+09:00 Subject: Re: Tk under Ruby [newbie to ruby] Hi, From: MENON Jean-Francois Subject: Re: Tk under Ruby [newbie to ruby] Date: Thu, 25 Apr 2002 17:23:03 +0900 Message-ID: <3CC7A481.7D8A20D7@meteo.fr> > when entering Tk.mainloop, you don't exit of the loop, so it must be the > last instruction of your program. You can stop Tk.mainloop. But then, re-drawing of widgets stops too. :-) It is sometimes useful. If you need your application's GUI window only temporarily, you will be able to hide (withdraw) the window and stop Tk.mainloop. It maybe make your application's response speed up. > I suppose that's why ruby's Threads works slowly with Tk.mainloop. I think the cost of thread switching between Ruby and Tk is large. > And that's why I think that the events loop should be integrated into > the ruby's interpreter loop. Whether it is integrated, the cost will not change. The event loop is heavy routine. Therefore, I think it is better to be able to control when the event loop shold be running. Don't you think so? -- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)