Hi, 

From: Hidetoshi NAGAI <nagai / dumbo.ai.kyutech.ac.jp>
Subject: Re: tcltklib and not init'ing tk
Date: Sun, 5 Oct 2003 01:55:50 +0900
Message-ID: <20031005.015546.74755857.nagai / dumbo.ai.kyutech.ac.jp>
> BTW, there is a known bug on tcltklib.c. It causes 'Segmentation 
> Fault' when 'vwait' or 'tkwait' command is called on the other 
> thread than 'mainloop' thread. Those commands call Tcl_DoOneEvent() 
> function. And it conflicts with the eventloop control of tcltklib.c. 
> I've been working on fixing the problem. I think I must implement 
> the routines to replace 'vwait' and 'tkwait'.  

I implemented them on the CVS. If you are interested in them, 
please try them. 
-----<ChangeLog>----------------------------
Wed Oct 15 00:20:15 2003  Hidetoshi NAGAI  <nagai / ai.kyutech.ac.jp>

        * ext/tcltklib/tcltklib.c: replace Tcl/Tk's vwait and tkwait to
          switch on threads smoothly and avoid seg-fault.

        * ext/tcltklib/tcltklib.c: add TclTkIp._thread_vwait and
          _thread_tkwait for waiting on a thread. (Because Tcl/Tk's vwait
          and tkwait command wait on an eventloop.)

        * ext/tk/lib/multi-tk.rb: support TclTkIp._thread_vwait and
          _thread_tkwait.

        * ext/tk/lib/tk.rb: now, TkVariable#wait has 2 arguments.
          If 1st argument is true, waits on a thread. If false, waits on
          an eventloop. If 2nd argument is true, checks existence of
          rootwidgets. If false, doesn't. Default is wait(true, false).

        * ext/tk/lib/tk.rb: add TkVariable#tkwait(arg) which is equal to
          TkVariable#wait(arg, true). wait_visibility and wait_destroy
          have an argument for waiting on a thread or an eventloop.

        * ext/tk/lib/tk.rb: improve of accessing Tcl/Tk's special variables.

        * ext/tk/lib/tkafter.rb: support 'wait on a thread' and 'wait on
          an eventloop'.
-------------------------------------------
-- 
                                  Hidetoshi NAGAI (nagai / ai.kyutech.ac.jp)