<div dir="auto"><div><div class="gmail_extra"><div class="gmail_quote">Am 27.10.2017 11:08 schrieb "Ryan Joseph" <<a href="mailto:ryan@thealchemistguild.com">ryan@thealchemistguild.com</a>>:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="quoted-text"><br>
<br>
> On Oct 27, 2017, at 4:02 PM, Michael Van Canneyt <<a href="mailto:michael@freepascal.org">michael@freepascal.org</a>> wrote:<br>
><br>
> Why you were advised to include these calls explicitly ?<br>
><br>
> The only reason I can think of is when your code runs in a DLL, called by an<br>
> application that creates threads externally, or when you have callbacks from<br>
> a DLL which can be called from a thread created by the DLL.<br>
<br>
</div>I don’t remember because it was years ago. I believe Jonas advised this but it may have been related to Objective Pascal and some bugs that existed back then. The threads I’m creating are coming from Apple's Cocoa framework (which were crashing) but I was also using it in the SDL library for platform independent threads (which isn’t crashing).<br>
<br>
Maybe just old obsolete information so I’ll remove them since they weren’t doing anything anyways as far as I can tell. Thanks.</blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">I'd guess that this was before lazy initialization of threadvars for pthreads was implemented (in 2.4 or 2.6 I think). Nowadays that should indeed not be necessary anymore. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"></div></div>