Given that OGR is not reentrant and is not thread safe, is there any
way I can get OgrDatasources to work for concurrent reading from different threads? or is ot my only choice to spin off a
separate process for each of the data sources?<br>
<br>
Marek,<br>
I have no need for OGR to be thread safe, since I would prefer to have
each of my threads to instantiate its own OGR objects, therefore they
would not need to be protected from simultaneous access.&nbsp; Are you
saying that it is the limitations of PROJ.4 that make OGR not reentrant
thus causing my problem?<br>
Please forgive my ignorance, I am just not that familiar with the code...<br>
<br>
Thanks for all the help!<br>
-eugene<br>
<br><div><span class="gmail_quote">On 9/22/06, <b class="gmail_sendername">Marek Brudka</b> &lt;<a href="mailto:mbrudka@aster.pl" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">mbrudka@aster.pl</a>
&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<a href="mailto:ugeni79@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ugeni79@gmail.com</a> napisał(a):<br>&gt; Hi,<br>&gt; I am using gdal 1.3.1 on windows and when I try to read from two
<br>&gt; different shapefiles at the same time from two different threads my
<br>&gt; application crashes. Is OGR (or maybe in this case shapelib) supposed<br>&gt; to be reentrant? If not, has anyone looked at what it would take to<br>&gt; make it reentrant?<br>&gt; Any help would be greatly appreciated!
<br>Hi,<br><br>OGR is neither reentrant nor thread-safe. There were some efforts in<br>GDAL 1.3.x to make it thread safe, but the work does not seem to be<br>finished. There some fundamental architectural misconceptions in OGR
<br>which prevents GDAL to be thread safe.<br>However you should not care about all of that that during mutual access<br>to two different shapes from two different threads. AFAIK the code in<br>OGR related with PROJ.4's thread unsafety is guarded quite well.
<br><br>Regards<br>Marek<br><br></blockquote></div><br>