[Gdal-dev] GDAL Thread Safety

Frank Warmerdam warmerdam at pobox.com
Fri Dec 1 13:56:04 EST 2006


Jason Beverage wrote:
> Is there anything in particular that I should be looking out for in this
> situation?  I'm using different GDALDataset objects, but they are
> pointing to the same file on disk, which I wasn't sure if it was a
> problem.

Jason,

As long as each thread has a distinct GDALDataset object, and as long
as all access is read-only, then things should be fine.

Note that this thread safety assertion does not necessary apply to all
drivers.  Only a few drivers (Geotiff, Imagine) have been carefully
reviewed and tested.  I imagine most drivers are ok, but you should use
some caution, and testing things you depend on yourself.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list