[cairo] Static caches and thread-safety

Pierre-Alain Joye pierre at dotgeek.org
Fri Nov 12 07:03:33 PST 2004


Hello,

On 11/11/2004, "Carl Worth" <cworth at cworth.org> wrote:

>But how shall we fix this?

we got the same issue in PHP in the FT part of ext/gd. I did not get the
time to test or check what stands actually in cairo  but may work the
same way.

Using  a different caching system, but having the same threads issues,
one fixed it in php using mutex. PHP being used on many platforms, I did
not see any bugs related to threads (esp. on win32 IIS or apache2, at
least releated to gd-freetype, php extensions being not all thread safe).

The related files are:
Macros definitions (setup, shutdown, un/lock)
http://cvs.php.net/php-src/ext/gd/libgd/gdhelpers.h

and used in
http://cvs.php.net/php-src/ext/gd/libgd/gdft.c

hope that helps,

--Pierre



More information about the cairo mailing list