Is the DataSource.delete() method (from java binding) thread safe?<br><br>Thanks<br><br><div class="gmail_quote">On Wed, Jan 11, 2012 at 3:09 PM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@mines-paris.org">even.rouault@mines-paris.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div style="font-family:'Sans Serif';font-size:9pt;font-weight:400;font-style:normal">
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">Le mercredi 11 janvier 2012 22:32:45, Billy Newman a écrit :</p><div><div class="h5">
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">> I am using a third party lib (imageio-ext) to leverage gdal in java code.</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">> I have noticed that the imageio-ext folks have wrapped the gdal.Open(..)</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">> call in a synchronized method. I am assuming this is to prevent</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">> imageio-ext users from hanging themselves with regard to thread safety.</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">> </p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">> I have looked at the gdal FAQ with regards to thread safety and the last</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">> release that it mentions additions is 1.3.0.</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">> </p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">> What is the current status of the 1.9.* build with regards to thread</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">> safety.</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></p>
</div></div><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">The following is still true : "In particular for the situation where many threads are reading from GDAL datasets at once should work as long as no two threads access the same <a href="http://www.gdal.org/classGDALDataset.html" target="_blank"><span style="text-decoration:underline;color:#0057ae"> GDALDataset</span></a> object at the same time. However, in this scenario, no threads can be writing to GDAL while others are reading or chaos may ensue. "</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">I believe most common GDAL drivers should be safe. That includes drivers that don't depend on third party librairies (the driver is self contained in GDAL source tree), and drivers that depend on "classic" third-party libraries (such as PNG, JPEG, GIF). For other third party libraries (netCDF, HDF4, HDF5, ...), this depends on whether they are thread-safe themselves. There's at least one driver that is known to be non thread-safe : GRIB.</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">> </p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">> Thanks,</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">> Billy</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></p></div></blockquote></div><br>