<div dir="ltr">You could use TPasMPSemaphore from my PasMP project ( <a href="https://github.com/BeRo1985/pasmp/">https://github.com/BeRo1985/pasmp/</a> and respectively <a href="https://github.com/BeRo1985/pasmp/blob/master/src/PasMP.pas">https://github.com/BeRo1985/pasmp/blob/master/src/PasMP.pas</a> ) which is also cross-platform-capable.<div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 19, 2017 at 6:29 PM, Anthony Walter <span dir="ltr"><<a href="mailto:sysrpl@gmail.com" target="_blank">sysrpl@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">Thanks for that bit of information Charlie. I should have searched the svn logs.</div><div class="gmail_extra"><br></div><div class="gmail_extra">As a note to this, I am using semaphores quite a bit in SDL2 to guard against things like changes to audio banks in the ui thread and reading audio sample bits in the audio mixer thread, which SDL2 sets up whenever you play audio. There are other places where I use semaphores, but the point is SDL2 implements semaphores across all platforms and they work consistently.</div><div class="gmail_extra"><br></div><div class="gmail_extra"><a href="https://wiki.libsdl.org/SDL_CreateSemaphore" target="_blank">https://wiki.libsdl.org/SDL_<wbr>CreateSemaphore</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">It just seems to me like the concept of a semaphore has been well established in CS for decades and it's a bit weird to remove them from the rtl. They are native to all platforms (I just checked). Sure they we not used by any rtl internal functions/objects (in TThread for example), but I don't believe that should have been reason enough to get rid of them.</div><div class="gmail_extra"><br></div><div class="gmail_extra">In other words, just because a one group of developers don't use a tool, that shouldn't dictate its removal.</div></div>
<br>______________________________<wbr>_________________<br>
fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.<wbr>org</a><br>
<a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal" rel="noreferrer" target="_blank">http://lists.freepascal.org/<wbr>cgi-bin/mailman/listinfo/fpc-<wbr>pascal</a><br></blockquote></div><br></div></div>