Hi, > I am trying to add an async interface to node-gdal (the Node.js bindings > for GDAL) and I can't find any official statement on the library's > thread safety.
The default for standard C/C++ libraries: you can't use any object/handle concurrently from multiple threads, unless it is explicitly mentionned to be safe. > There is an old FAQ on the trac server which states that > one should not access the same GDALDataset from multiple threads but it > has a section about GDAL 1.5 and another one about GDAL 2.x, so I guess > that it is not really up to date. Most of what applies to GDAL 2 should still apply in this respect. > > There is also the RFC 47 that mentions a static global mutex (impacting > the performance) which makes me think that synchronization is already > taken care of? RFC 47 was never adopted/implemented. I've modified its title to make it more obvious. > > Am I safe calling RasterIO on the same dataset from multiple threads? No, you aren't. > Are there some operations that work and others that do not? From what I > have encountered so far, simple reading seems to work for me. You have been just lucky. It could just crash with other drivers, other situations. Even -- Spatialys - Geospatial professional services http://www.spatialys.com
_______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
