[fpc-pascal] What's the deal with CloseThread?
sysrpl at gmail.com
Tue Apr 23 22:40:32 CEST 2013
Thanks for so much Sven. I have another question.
Is it okay for a thread to close itself before it's finished? Because I
believe that is what happens when FreeOnTerminate is set to True. Here is a
brief synopsis of what can execute:
Line 168: FreeThread := Thread.FFreeOnTerminate; // captures free on
Line 173: Thread.Free; // invokes the destructor from within the thread
Line 197: CloseThread(FHandle); // thread is closed in destructor
Line 174: EndThread(Result); // flow returns here, but the thread was
So what it looks like is that we expect code inside a thread continue
running after it has been closed.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal