вообще просто так использовать TerminateThread не совсем true:
Цитата:
TerminateThread is a dangerous function that should only be used in the most extreme cases. You should call TerminateThread only if you know exactly what the target thread is doing, and you control all of the code that the target thread could possibly be running at the time of the termination.
|
обычно всегда возможно сделать корректное завершение работы потока по
сигналу из основного. ведь даже не прерываемый Sleep можно заменить прерываемым WaitForSingleObject на event object.