Re: [Pango] Thread-safety status/workaround?



On 05/15/11 19:47, Alessandro Pignotti wrote:
> Hi,
> 
> first of all thanks for the quick answer. Although we know that mainstream 
> browsers are employing process separation I don't like the idea of relying on 
> such feature for correct execution.
> 
> The FreeType FAQ (http://www.freetype.org/freetype2/docs/ft2faq.html) asserts 
> that the library is currently completely thread safe,

That's an interesting way to state it :).  As long as you don't use an
FT_Library or any other FreeType object from multiple threads, it's
thread-safe indeed :)).  But cairo already masks that for us.

Then there's fontconfig.  The pangofc layer should be fixed to lock around
fontconfig calls.  Then there's pango's own objects.


> Could you please explain (or link to relevant 
> documentation) why pango is not thread safe? I'm interested in working to fix 
> the issue and such information would be really useful.

There's more detail here:

  https://bugzilla.gnome.org/show_bug.cgi?id=377539

behdad



> Thanks a lot,
> Alessandro Pignotti
> 
> 
> On Sunday 15 May 2011 23:11:24 Behdad Esfahbod wrote:
>> On 05/15/11 15:41, Matthias Gehre wrote:
>>> Hello everybody,
>>>
>>> I have a question regarding the status of thread-safety in pango.
>>> I found an old thread announcing some work on that aspect,
>>> but I could not find any confirmation of that it is actually safe
>>> to use it from multiple threads now.
>>>
>>> To clarify, we have the following scenario:
>>> We develop an NPAPI plugin, which we want to use pango for text
>>> rendering. The NPAPI plugin usually runs in a thread of the browser,
>>> for
>>> example firefox. But firefox also uses pango for text rendering, and
>>> there are no means to synchronize our usage of pange with that of
>>> firefox.
>>
>> FF4 runs NPAPI plugins in a separate process by default.  I believe Chrome
>> does the same.
>>
>>> Is this still a problem in current pango? If yes, are there ambitions
>>> to fix that or is an usable workaround available?
>>
>> It still is a problem.  No concrete plans to fix it at this time.
>>
>> behdad
>>
>>> Thank you!
>>>
>>> Best regard,
>>> Matthias Gehre
>>>
>>> P.S.: Please CC Alessandro Pignotti <a pignotti sssup it>, thanks!


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]