title: Interrupt Sleep method of TThread (and only Sleep method)
body: <p>I am looking for an ability to interrupt <code>TThread</code> quickly.</p>
  
  <p>Some suggest to interrupt it with <code>TerminateThread</code>, but I do not want this violence.</p>
  
  <p>I implemented an exit check in <code>Execute</code> method, but there is one thing I cannot influence: an ongoing <code>Sleep</code>. When a thread is in <code>Sleep</code> the only thing left to me is to wait until <code>Sleep</code> finishes.</p>
  
  <p>I made a following workaround:</p>
  
  <pre><code>procedure TMyThreadTimer._smartSleep(Timeout: Integer);
  var
    repeats: Integer;
  begin
    repeats := (Timeout div 50) + 1;
    while (not Terminated) and (repeats &gt; 0) do begin
      Sleep(50);
      Dec(repeats);
    end;
  end;
  </code></pre>
  
  <p>but it looks not good.</p>
  
  <p>Is there an ability to interrupt <code>Sleep</code>, but not the thread?</p>