Set FreeOnTerminate to false and read Finished propery to find out if Execute() function has been finished.
if(myThread->Finished)
{
}
Question
Since C++ Builder 2010 does not seem to include the CheckTerminated()
function on TThread
I added my own to a thread I needed to check the status of from outside the thread.
This works fine, but I'm trying to find information as to whether or not letting the Exectue()
function of the thread finish sets the Terminated
property to true
or if I manually have to do that at the end of the Execute()
method, alternatively run Terminate()
at the end of the Execute()
method.
Solution
Set FreeOnTerminate to false and read Finished propery to find out if Execute() function has been finished.
if(myThread->Finished)
{
}