Setting Complete does not automatically kill the stream.
The specified property is set from another thread to signal this worker thread, which it must complete. Then, to the workflow, to obey the signal by checking the "Finish" flag in the "Run" procedure.
After the Execute procedure completes, the Thread Finished property is automatically set.
When the main process is killed, your threads will be interrupted and will be forcibly killed. If you come to an end, you mean whether it reaches the end of the Execute procedure, and then not. He can stop right in the middle.
In your main form, close the request, politely set the Terminated property on the threads and wait for them to finish. You can go through them and check. But after a good timeout, you can refuse and just close the program, which will interrupt and kill threads.
source share