From: MENON Jean-Francois Date: 2001-12-29T16:39:15+09:00 Subject: [ruby-talk:29621] Re: Tk / IO question Bob Calco wrote: > > I'm experiencing some rather significant performance problems with IO.popen > when embedding the logic in a Tk app. hi I encountered some similar problems when trying to read from a socket while running at Tk app. The main problem, I suppose, is that threads are implemented in the ruby interpreter while Tk.mainloop is running in the binary library tcltk. the solution I found is to run Tk.mainloop, and then call the reads from inside the Tk.mainloop using Tk.After: inp=Thread.new(){ timer=TkAfter.new(100,-1,proc {$igsClient.getlines}) timer.start } (100ms, -1 == loop) regards, jf