Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does a finished Execute() function set the Terminated property

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.

like image 294
inquam Avatar asked Nov 27 '25 06:11

inquam


1 Answers

Set FreeOnTerminate to false and read Finished propery to find out if Execute() function has been finished.

if(myThread->Finished)
{
}
like image 118
mh taqia Avatar answered Nov 29 '25 22:11

mh taqia



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!