Posted to tcl by apn at Wed Oct 02 14:55:26 GMT 2024view raw

  1. % package require promise
  2. 1.1.0
  3. % set echoCmd [auto_execok echo]
  4. C:/Windows/System32/cmd.exe /c echo
  5. % set p1 [promise::pexec {*}$echoCmd First command done]
  6. ::oo::Obj65
  7. % set p2 [promise::pexec {*}$echoCmd Second command done]
  8. ::oo::Obj66
  9. % $p1 done puts; $p2 done puts
  10. First command done
  11.  
  12. Second command done
  13.