[fpc-pascal] CloseThread needed? still unclear

noreply at z505.com noreply at z505.com
Mon Nov 28 21:25:48 CET 2011


> Am 14.11.2011 02:32, schrieb noreply at z505.com:
>> First I thought I would post this to the mailing list to ask you what
>> the
>> proper way to program with threads is. If we must call closethread on MS
>> Win machines but not unix machines, then something needs to change to
>> make
>> the threading in the RTL more cross platform (and all the docs would
>> need
>> to mention things about closethread if it is needed).
>
> The bug was already mentioned here
> http://mantis.freepascal.org/view.php?id=13160 and fixed for 2.2.2.
> "CloseThread" was implemented in a cross platform way.
>
> Regards,
> Sven

Hmm, but the compiler I'm using right now is a 2.4 and I think there is a
leak if I don't call closethread. CloseThread was implemented for
EndThread or how does it get called? I think the closethread has to be
called outside the thread rather than inside the thread from what I tried,
but I don't know.



More information about the fpc-pascal mailing list