title: Running a thread for some fixed time and killing it if time is out
body: <p>I want to run a thread for some fixed amount of time.<br>
   If it is not completed within that time, I want to either kill it, throw some exception, or handle it in some way. How can this be done?</p>