Zitat von
mirage228:
Du terminierst den Thread, in dem deine Berechnung läuft, einfach mit der Methode
TerminateThread.
Ich sagte "
sauber".
Zitat von
PSDK:
TerminateThread is used to cause a thread to exit. When this occurs, the target thread has no chance to execute any user-mode code and its initial stack is not deallocated. DLLs attached to the thread are not notified that the thread is terminating.
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.