As I usually describe the problems of stopping the flow, cooperation must be emphasized. You must not interrupt the flow. Instead, you should notify the thread that you want it to terminate. Then you politely wait until it ends.
The reasons for this are obvious. Only the stream knows how to finish itself. Only the thread knows what locks it holds, what resources it needs to release, etc.
, . , , .
Delphi TThread Thread.Terminate. , . . TThread.Execute. Terminated. , . , exit (, ..).