[fpc-pascal] What's the deal with CloseThread?
sysrpl at gmail.com
Tue Apr 23 16:28:19 CEST 2013
On Tue, Apr 23, 2013 at 9:22 AM, Marco van de Voort <marcov at stack.nl> wrote:
> The TThread code was never specified in terms of the procedural api. As
> the procedural api largely came after tthread was stable.
> Probably at some point calls to the threadmanager were substituted with
> calls to beginthread.
BeginThread, EndThread, CloseThread all directly call thread manager
entries behind the scenes, so substituting a call to the thread manager
with a call to any of those functions are the same.
To explain, I am writing my own light threading library and just want to
ensure my housekeeping is being done correctly. Looking at the current
thread system which people use (TThread) and looking at the documentation
for BeginThread, EndThread, CloseThread, there seems to be a discrepancy.
I'd like to know which is correct.
That is, it is okay to call BeginThread and never call CloseThread? Because
that is how TThread currently works, and is in contradiction to the
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal