[Proj] PROJ.4 thread-safety (same player shoot again)
pmezard at gmail.com
Fri Feb 25 09:26:12 EST 2005
On Fri, 25 Feb 2005 09:18:33 -0500, Gerald Evenden
<gerald.evenden at verizon.net> wrote:
> To the best of my knowledge, the pj_errno is the only item to be
> There are no other globals and all "static"s refer to const's or
> local to a file.
> I would sure like to see an abstract of code that you used to handle
> the pj_errno
> condition. Please. Net documentation of the area is sparse.
I just declared the variable as a "thread" variable. With MSVC7.1 this
is done like :
__declspec(thread) extern int pj_errno; /* global error return code */
__declspec(thread) C_NAMESPACE int pj_errno = 0;
I have not tested it in multithreaded environment yet, but at last it
compiles and the library keeps working as before. I will notify you if
anything unexpected happens with it.
More information about the Proj