<div dir="ltr"><div><div><div><div>Thanks Ebrahim.  Hi Robin,<br><span class="gmail-pl-c"><br></span></div>I'm confused.  HarfBuzz definitely IS completely threadsafe to the best of my knowledge.  That was one of the strong design goals. I have had to maintain, debug, and fix threadsafety issues in FreeType, fontconfig, and Pango over the years, so I definitely know the issues and tried to address them all in HarfBuzz.<br><br><div style="margin-left:40px">* It is utterly thread unsafe. It uses statics to hold<br>* structures in, meaning that if it is ever called from<br>* more than one thread at a time, access to such<br>* structures can race.</div><div style="margin-left:40px"><span class="gmail-pl-c"></span></div><span class="gmail-pl-c"><br></span></div><div><span class="gmail-pl-c">This can't be farther from true.  I use compare-and-exchange to safely implement singleton initializations or prepend-only linked-lists as caches.  How is that not threadsafe?<br></span></div><div><span class="gmail-pl-c"><br></span></div>Runtime-configurable custom allocators are different issue.  I don't believe they are a useful feature and have not yet seen a compelling usecase.<br><br></div><div>Since Robin is not on the mailing list, let's continue on github: <a href="https://github.com/behdad/harfbuzz/issues/497">https://github.com/behdad/harfbuzz/issues/497</a><br></div><div><br></div>behdad<br><br></div>PS. Sometime I think about shutting down the list and using github exclusively.  What do people think?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 15, 2017 at 12:18 PM, Ebrahim Byagowi <span dir="ltr"><<a href="mailto:ebraminio@gmail.com" target="_blank">ebraminio@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">Hi!<div><br></div><div>Thanks for your encouraging words :)</div><div><br></div><div>forwarding to hb mailing list<div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 15, 2017 at 3:46 AM, Robin Watts <span dir="ltr"><<a href="mailto:robin.watts@artifex.com" target="_blank">robin.watts@artifex.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 14/06/2017 21:37, Ebrahim Byagowi wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I wonder if is possible to turn this <<a href="https://github.com/ccxvii/mupdf/blob/master/source/fitz/harfbuzz.c#L12" rel="noreferrer" target="_blank">https://github.com/ccxvii/mup<wbr>df/blob/master/source/fitz/har<wbr>fbuzz.c#L12</a>> comment about harfbuzz on mupdf project into some doable/trackable tasks on harfbuzz bug tracker or are they just might not possible to solve because of ABI compatibility (or fixed already)? Thanks<span class=""><span><br>
<br>
(bcc'ed the author to this thread also)<br>
</span></span></blockquote>
<br>
Hi.<br>
<br>
I'd LOVE to see Harfbuzz fixed. It's a brilliant library, let down by this major flaw.<br>
<br>
My experience of fixing such issues in several projects is that fixing it in involves extensive, but ultimately simple, plumbing through of a context field.<br>
<br>
It's not brain surgery, but it's tedious, and it's not something I'd undertake myself without knowing in advance that it would stand a good chance of being accepted.<br>
<br>
I'd love to work with anyone that would be prepared to try to fix this.<br>
<br>
Sadly, I believe that such things would involve a break to the ABI though...<br>
<br>
(I fear this may bounce because I'm not on the harfbuzz list...)<span class="m_5827833640169537124HOEnZb"><font color="#888888"><br>
<br>
Robin<br>
</font></span></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
HarfBuzz mailing list<br>
<a href="mailto:HarfBuzz@lists.freedesktop.org">HarfBuzz@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/harfbuzz" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/harfbuzz</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">behdad<br><a href="http://behdad.org/" target="_blank">http://behdad.org/</a></div>
</div>