Posted to tcl by gps at Sun Apr 05 00:18:05 GMT 2009view raw

  1.  
  2. set i [interp create]
  3.  
  4. set sec [expr {[clock seconds] + 5}]
  5. interp limit $i time -seconds $sec -command [list callback $i]
  6.  
  7. proc callback {i} {
  8. puts "limit hit... increasing limit..."
  9.  
  10. set sec [expr {[clock seconds] + 5}]
  11.  
  12. interp limit $i time -seconds $sec -command [list callback $i]
  13. }
  14.  
  15. $i eval {
  16. while 1 {}
  17. }
  18.