[Proj] libproj4 thread safety

Gerald Evenden gerald.evenden at verizon.net
Thu Feb 24 00:40:51 EST 2005


Did a little browsing on the thread business.

Libproj4 is not thread safe unless action is taken on pj_errno  It is 
my understanding
that something can be done about it but details are beyond me at the 
moment.

To my knowledge, all other active space is purely stack activated and 
there are no
other static variables.  Everything is saved in the pj_init pointer 
which, at the moment
and to the best of my recollection can be considered const after return 
from pj_init.

Does that answer the question/problem?

Secondly, I do not want to try to make the error flagging part of the 
internal
procedural calling.  Too long and involved procedure and would require 
extensive
shaking down of libproj4 to make sure it runs proper.

It is my understanding that the problem of pj_errno can be handled by 
threading
procedure and I would be glad to install any conditional compile 
statements
to facilitate that enhancement.

I think the earlier change of adding pj_error(void *pj) would also be a 
reasonable
suggestion for all applications but the structure would become 
non-const.

_____________________________________
Jerry and the low riders: Daisy Mae and Joshua.
"The whole religious complexion of the modern world is due to the
absence from Jerusalem of a lunatic asylum." Havelock Ellis, 1914




More information about the Proj mailing list