title: TCL: timeout a proc which may hang
body: <p>I've created a proc which may just hang there depending on the inputs. Now I want to set a timeout value for it and force it to return and continue other works once the time is up. </p>
  
  <p>The <code>vwait</code> way seems don't apply for my case here. If I put <code>vwait</code> after my proc, like: </p>
  
  <pre><code>after sometime set status timeout
  proc_may_hang
  vwait status
  </code></pre>
  
  <p>If the proc hangs, the <code>vwait</code> will never be executed, event loop never got started and system does not know about monitoring the variable status either.</p>
  
  <p>And I cannot use multi-threading to start a monitoring process either. The TCL interpreter is from a EDA software, the Thread package is not available.</p>
  
  <p>So is there anyway to force the proc to return? Thanks a lot!</p>