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

Sven Barth pascaldragon at googlemail.com
Tue Apr 23 11:09:25 CEST 2013


Am 23.04.2013 09:56, schrieb Anthony Walter:
> I get your point about Windows + CloseHandle
>
> But I'm still confused with regards to every other platform. You say 
> yes, affirming the documentation ... that CloseThread must be called 
> ... nowhere in any of the platform code I've search is CloseThread 
> used, ever. (even though BeginThread is used)
The only RTL that currently really does something inside CloseThread is 
the Windows RTL which calls CloseHandle like TThread.SysDestroy does. So 
it would probably best to adjust the TThread implementation to always 
call CloseThread as well and remove the CloseHandle in the Windows 
implementation of TThread.SysDestroy call...

Regards,
Sven



More information about the fpc-pascal mailing list