[fpc-pascal] InitThread/DoneThread

Michael Van Canneyt michael at freepascal.org
Fri Oct 27 11:02:13 CEST 2017



On Fri, 27 Oct 2017, Ryan Joseph wrote:

> In the latest version of MacOS calls to InitThread starting crashing so I
> removed the InitThread/DoneThread pair and surprisingly nothing broke.  I
> was instructed some years ago to include these in my threads to support
> the FPC runtime but what are they really for?  I wasn’t able to get any
> support as to why their crashing but if they’re needed I’d like to omit
> them obviously.

Normally they are called internally when needed.

Why you were advised to include these calls explicitly ?

The only reason I can think of is when your code runs in a DLL, called by an
application that creates threads externally, or when you have callbacks from
a DLL which can be called from a thread created by the DLL.

Michael.


More information about the fpc-pascal mailing list