Posted to tcl by schelte at Mon Jun 28 09:03:53 GMT 2010view raw
- set code {
- puts before
- wait 2000
- puts after
- }
- interp create foo
- foo alias wait wait
- proc wait {time} {
- after $time [info coroutine]
- yield
- }
- coroutine main foo eval $code
- after 2500 exit
- vwait forever
- # Error: cannot yield: C stack busy