<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 16 Oct 2010, at 13:57, Benedikt Schindler wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><blockquote type="cite"><blockquote type="cite">- FreeOnTerminate should be gone, (meaning no way to actively call<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> TThread.Destroy from another thread, a thread gets destroyed<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> automatically when it leaves its execute method)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> (IIRC FreeOnTerminate was even set to False by the default<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">  constructor, so you had the choice of either using the default<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">  or introducing a race condition by setting it after the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">  "inherited Create" - which starts the execute.)<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">This problem has been solved with <a href="http://bugs.freepascal.org/view.php?id=16884">http://bugs.freepascal.org/view.php?id=16884</a><br></blockquote><font class="Apple-style-span" color="#006312"><br></font>But i think also the "bug" report you are linking to, shouldn't be a fpc<br>bug. It is more a programmer bug. As programmer i have to know at which<br>time i call the create methode of my TThread.</div></blockquote><div><br></div><div>He cannot. If freeonterminate=true, then even if you call "inherited create(false)" as the very last statement of your constructor, the thread may already have finished running and freed itself before AfterConstruction is called. The AfterConstruction call will then crash.</div></div><br><div><br></div><div>Jonas</div></body></html>