[Proj] threadsafety and PROJ.4 - the projCtx API Update
Glynn Clements
glynn at gclements.plus.com
Fri Jun 11 03:54:24 PDT 2010
Frank Warmerdam wrote:
> For a project I'm involved in (a spatial capability for Ingres), it is
> desirable to make PROJ.4 threadsafe. In the past some work has been
> done to protect some parts of PROJ.4 with mutexes (ie. grid loading
> code). However, at least one major hole remained in the thread safety
> of the library, and that was the use of "pj_errno" as a global error
> variable. It is not only used to report to the application, but also
> for various internal checks.
> I must confess I've just gone ahead and done this without seeking
> permission, but if there are strong reasons not to use this approach
> I'd consider backing it out in favor of another solution. So I'm seeking
> feedback on the approach and if anyone sees other problems.
Is there a reason for not using thread-local state, as is done for
errno?
--
Glynn Clements <glynn at gclements.plus.com>
More information about the Proj
mailing list