Andreas Leitgeb wrote:
> Since Tcl 8.6, we got coroutines, and they could have solved your> problem:>> A coroutine is a "task" that will run given code, which can "yield"> (which is like a pre-mature "return", while holding the current stack)> and later be called again to continue right where it last yielded.>> You can call the coroutine from an event-handler, have it do some> part of its job then yield - thereby going right back to the event-loop> until it gets called again.
The coroutine package in tcllib provides a coroutine-aware version of
vwait that can be freely nested without blocking other invocations of
itself, provided it is called from within a coroutine (meaning your
callbacks/event handlers/bind scripts should be coroutines themselves).
http://core.tcl.tk/tcllib/doc/trunk/embedded/www/tcllib/files/modules/coroutine/tcllib_coroutine.html
-J
------------------------------------------------------------------------------
Slashdot TV. Videos for Nerds. Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Tcl-Core mailing list
Tcl-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tcl-core