Hi,
I have a multithreaded application that uses GDAL. Generally it works fine,
but sometimes I have a hang when trying to create transformations from
different threads.
Seems like race condition occures when initializing static CPLMutex
*hConfigMutex located in gdal\port\cpl_conv.cpp file;
I was able to fix the issue by calling a function that initializes the mutex
before calls from different threads(just calling the following code:
CPLGetConfigOption("GDAL_DATA", nullptr);) but it doesn't feel right.
So, my question is: What is the correct way to initialize GDAL library in
multithreaded environment?(if such exists). If there are no such
possibility, maybe some function INITGDAL() can be added that will do the
magic?
Best regards,
KS.
--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev