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

package require Thread

set t [thread::create {thread::wait}]

thread::send -async $t {proc foo {} {puts $::time}}

thread::send -async $t {set time 100}

thread::send -async $t {foo}