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:

In rtl/objpas/classes/classes.inc

Line 168: FreeThread := Thread.FFreeOnTerminate; // captures free on
termiante
Line 173: Thread.Free; // invokes the destructor from within the thread
Line 197: CloseThread(FHandle); // thread is closed in destructor
TThread.Destroy;
Line 174: EndThread(Result); // flow returns here, but the thread was
already closed

So what it looks like is that we expect code inside a thread continue
running after it has been closed.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to