[FWTools] Thread safety of GDAL - recent information?

Even Rouault even.rouault at mines-paris.org
Tue Sep 6 10:25:27 EST 2011


Selon Mikael Rittri <Mikael.Rittri at carmenta.com>:

> Hello,
>
> I wonder if there is any up-to-date information
> about how thread-safe GDAL is.
>
> I have found the http://trac.osgeo.org/gdal/wiki/FAQMiscellaneous
> page, where there is a short paragraph. But the text
> seems a bit old, since it refers only to GDAL 1.3.0.
> I hoped there might be more information somewhere.
>
> For example, the FAQ text says:
>
>     "Also, while the GDAL core infrastructure is now
>      thread-safe for this specific case, only a few
>      drivers have been vetted to be thread safe."
>
> So, is there a list of the thread-safe drivers?
>
> Or a blacklist of drivers with known threading problems?

The statements sound probably pessimistic because it is difficult to guarantee
that there are no issues. The situation nowadays(*) is quite good and I'm not
aware of drivers that are known to be unsafe. Speaking for myself, I'd trust
most drivers that don't depend on a third-party library to be OK (and you can
also add the GTiff driver to that list). Drivers depending on third-party
library could potentially have issues if they require specific initializations,
but I have nothing particular in mind. It is just to give you a rule of thumb.
Anyway if you find issues, that's worth reporting so it can be fixed, or at
least documented in their specific documentation page.

But the main source of problems is generally a misuse of the GDAL API, for
example trying to access concurrently a dataset through the same dataset handle.

(*) Note: if you use FWTools for Windows, you are using a version that is a bit
ancient now. I'd encourage you to migrate to more recent builds : see Windows
section of http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries

>
> Best regards,
>
> Mikael Rittri
> Carmenta
> Sweden
> http://www.carmenta.com
> _______________________________________________
> FWTools mailing list
> FWTools at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/fwtools
> http://fwtools.maptools.org/
>




More information about the FWTools mailing list