[SDL] SDL 1.2.9: last call...

Ryan C. Gordon icculus at clutteredmind.org
Thu Sep 8 00:06:08 PDT 2005

Albert Cahalan wrote:
> This fixes font handling to be thread-safe.

Does this make it thread safe for two threads accessing the same font? 
It looks like it just makes a seperate freetype library handle for each 
font, which would possibly make it thread safe for two seperate fonts in 
two threads.

Also, is freetype itself threadsafe, so long as you keep seperate 
library handles for each thread? How expensive is it to initialize a 
seperate library handle for each font? Is this valid use of the freetype 
API, or just asking for trouble since they generally expected 
applications to only initialize it once?

Sorry to ask so many questions, but I'm a little nervous about this 
patch...I'm wondering if it might be better to just create a mutex in 
TTF_Init() and serialize access where appropriate...


More information about the SDL mailing list