<div dir="auto"><div><div class="gmail_extra"><div class="gmail_quote">Am 02.02.2018 21:08 schrieb "Zoë Peterson via Lazarus" <<a href="mailto:lazarus@lists.lazarus-ide.org">lazarus@lists.lazarus-ide.org</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">On 2/2/2018 1:37 PM, R0b0t1 wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I've been looking for a replacement to<br>
<a href="http://www.omnithreadlibrary.com/" rel="noreferrer" target="_blank">http://www.omnithreadlibrary.c<wbr>om/</a> for a long time. If I remember, the<br>
dealbreaker is the library's codebase making heavy use of anonymous<br>
functions and procedures.<br>
</blockquote>
<br></div>
Yeah, OTL requires anonymous methods. I was hoping to port it to FPC once the anonymous method support landed, but AFAICT the cross platform port got pushed into OTL v4 and it looks like that stalled a year ago.</blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Once FPC supports anonymous functions as well I assume that support will start to become alive again. ;) </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="quoted-text"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Does System.Threading expose an API that could take either code<br>
references or anonymous methods? I'm very interested.<br>
</blockquote>
<br></div>
Yes, System.Threading has both "reference to procedure" and "procedure of object" overloads in the API, so you could implement most of it in the current FPC release. As Sven said, though, no one has started on it, and anyone who did work on it would have to be careful to not taint it with code from Delphi's implementation.</blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">The suggested way is to write tests for the Delphi implementation and to implement the FPC one based on those tests and the Delphi documentation. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"></div></div>