title: Force stop function execution
body: <p>I want to stop a function execution from caller after 10s, e.g:</p>
  
  <pre class="lang-js prettyprint-override"><code>let done = false
  
  setTimeout(() =&gt; {
    if (!done) throw new Error('Function timeout')
  }, 10000)
  
  await someClientCodeHere()
  
  done = true
  </code></pre>
  
  <p>This code works if something is waiting (i.e: on task queue/priority queue) but doesn't work if I put a for loop inside <code>someClientCodeHere</code>.</p>
  
  <p>My question is: <code>Is there anyway to stop a function that is on callStack?</code></p>