Posted to tcl by kap at Tue May 05 02:22:51 GMT 2015view raw

  1. package require Thread
  2.  
  3. set t [thread::create {thread::wait}]
  4.  
  5. thread::send -async $t {proc foo {} {puts $::time}}
  6.  
  7. thread::send -async $t {set time 100}
  8.  
  9. thread::send -async $t {foo}