[fpc-pascal] What's the deal with CloseThread?

Anthony Walter sysrpl at gmail.com
Tue Apr 23 07:19:17 CEST 2013

I was looking at threading support in the System unit and also in the
TThread class.

According to the documentation at

CloseThread must be called on any thread started with BeginThread. It must
be called after the thread has ended (either by exiting the thread function
or after calling EndThread).


Looking at the TThread class, which does indeed use BeginThread in
TThread.SysCreate (tthread.inc), I see no corresponding call the
CloseThread. I grepped the entire fpc source tree and found no references
anywhere to any code which calls CloseThread.

So what's the deal? Is the documentation wrong or is there something going
on with TThread I'm not seeing?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130423/7b91d380/attachment.html>

More information about the fpc-pascal mailing list