> On 28.11.2011 21:25, nore...@z505.com wrote: >>> Am 14.11.2011 02:32, schrieb nore...@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. > > That is exactly my point: CloseThread was implemented because of that > leak (see the comments in the bug issue I linked to). >
I see. I think I found some documentation that still doesn't include CloseThread in the examples.. I will send patches or recommendations to the documentation soon. For example closethread is now documented as a function, but some of the other pages that show threading examples just use endthread. I thought maybe closethread somehow was tied into endthread but this not the case. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal