Posted to tcl by aspect at Sat Apr 16 10:15:26 GMT 2016view raw

  1. package require Thread
  2.  
  3. set t [thread::create]
  4.  
  5. set resultvar() {}
  6.  
  7. trace add variable resultvar() write {
  8. unset -nocomplain resultvar()
  9. puts unset
  10. list }
  11.  
  12. thread::send -async $t {
  13. error "oh no"
  14. } resultvar()
  15.  
  16. vwait forever
  17.