freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] Thread Safety


From: David Turner
Subject: Re: [Freetype] Thread Safety
Date: Tue, 26 Mar 2002 14:45:22 +0100

Hello,

Leonard Rosenthol a écrit :
> 
> At 05:31 PM 3/11/2002 -0500, Dave Roach wrote:
> 
> > Could you please let me know whether thread safety is on the list of future 
> > development.  As it stands it appears that freetype is not thread
> > safe.
> >
> 
>         It should be.  What makes you think that it isn't??
>

Actually, FreeType 2 is re-entrant but not thread-safe, and this is
intentional (it allows a certain number of internal optimisations
that are not possible without introducing mutexes within the library
code)

You'd better use a mutex to synchronize access to the FT2 API
(and to the cache sub-system). In general, I don't think there's
a big win in using the library with multiple threads.. and I don't
want to provide a list of what each function changes in which
objects, since I'd like to be able to change the internal
behaviour as I see fit in the future..

If you really need it, you can create one FT_Library per thread
and use these concurrently with no problems..


Regards,

- David Turner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]