Ticket #525 (closed defect: wontfix)
Thread-safe freetype text with GD 2.0.17
| Reported by: | sgillies@… | Owned by: | sdlime |
|---|---|---|---|
| Priority: | high | Milestone: | 4.4 release |
| Component: | MapServer C Library | Version: | 4.3 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
From the GD 2.0.17 docs: Thread safety for freetype text output. Background: all gd functions were already thread safe, as long as only one thread manipulates each image -- except for gdImageStringFT and gdImageStringFTEx. This is because of a shared freetype font cache. Sharing the cache between images is worthwhile, so "configure" now detects pthreads and uses it to wrap freetype text output in a critical section if available. There is also critical section support under WIN32. Those who wish to be strictly thread-safe should call the new function gdFontCacheSetup before allowing any thread to use freetype text calls. Otherwise this function is automatically invoked on the first use of freetype, with a very small but real chance of a race condition. ---- We should take advantage of this. Should also look into MapServer's threading support for Win32.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

