I was read this on MSDN:

http://msdn.microsoft.com/en-us/library/windows/desktop/ms724211(v=vs.85).aspx

"Closing a thread handle does not terminate the associated thread or remove
the thread object. Closing a process handle does not terminate the
associated process or remove the process object. To remove a thread object,
you must terminate the thread, then close all handles to the thread."

So that would see to indicate on Windows at least, that CloseThread should
come after a thread has exited (I assume this should be the case for all
platforms). What this basically translates to is that threads should be
closed after use, but they cannot (or should not) be closed within its own
running thread context. It looks like something is wrong with whatever we
have at the moment.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to