Posted to tcl by mjanssen at Tue Jun 09 16:38:11 GMT 2020view raw

  1. package require Thread
  2.  
  3. set t [thread::create]
  4.  
  5. thread::send -async $t "interp create slave ; slave eval {package require http}; thread::wait "
  6. thread::send -async $t "slave eval {http::geturl http://www.google.com}"
  7.  
  8. thread::send -async $t {slave eval {puts [namespace current]}}
  9. vwait forever
  10.  
  11. -> ::http