Posted to tcl by kbk at Fri Nov 02 19:54:29 GMT 2012view raw

  1. proc comain {} {
  2. set configVar {configContent}
  3. yield [info coroutine]
  4. dosomething
  5. }
  6.  
  7. proc dosomething {} {
  8. upvar \#1 configVar cv
  9. yield $cv
  10. }
  11.  
  12. coroutine theCoro comain
  13. puts [theCoro]