freetype
[Top][All Lists]
Advanced

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

Re: [ft] Thread-related issues


From: David Turner
Subject: Re: [ft] Thread-related issues
Date: Wed, 16 May 2007 00:15:32 +0200

Humm, there is some confusion going

the library is reentrant because it doesn't use any global variable
but it is not thread safe as it doesn't use any sort of locking.

what this means is that if two threads have their own FT_Library instances,
they'll never collide/crash.

if you want several threads to access the data from a single FT_Library instance
however, you need to do proper locking on *any* call to FreeType.

Hope this helps,

- David Turner
- The FreeType Project  (www.freetype.org)


On Tue, 15 May 2007 21:45:58 +0100, "Charles Osborne" <address@hidden> said:
> Hi,
> 
> I have written an application using FreeType from a number of separate
> threads, and am noticing occasional crashes at certain points. The fact
> that the documentation states that the library is thread safe would lead
> me to assume that the way I'm using it, with a single shared FT_Library
> instance, and a single instance of each FT_Face, shared amongst all
> threads, is valid. All the exceptions I've seen so far are related to
> memory freeing.
> 
> Any suggestions?




reply via email to

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