title: C# killing a thread
body: <p>In my app, I have a thread that runs continuously. By using Thread.Sleep(), the function executes every 10 minutes.</p>
  
  <p>I need to be able to kill this thread when a user clicks a button. I know Thread.Abort() is not reliable. I can use a variable to stop the thread, but since it is sleeping it could be another 10 minutes before the thread kills itself.</p>
  
  <p>Any ideas?</p>