[Gdal-dev] Is OGR reentrant?
ugeni79 at gmail.com
ugeni79 at gmail.com
Fri Sep 22 16:09:34 EDT 2006
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?
Marek,
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. Are you saying that it is
the limitations of PROJ.4 that make OGR not reentrant thus causing my
problem?
Please forgive my ignorance, I am just not that familiar with the code...
Thanks for all the help!
-eugene
On 9/22/06, Marek Brudka <mbrudka at aster.pl> wrote:
>
> ugeni79 at gmail.com napisał(a):
> > Hi,
> > I am using gdal 1.3.1 on windows and when I try to read from two
> > different shapefiles at the same time from two different threads my
> > application crashes. Is OGR (or maybe in this case shapelib) supposed
> > to be reentrant? If not, has anyone looked at what it would take to
> > make it reentrant?
> > Any help would be greatly appreciated!
> Hi,
>
> OGR is neither reentrant nor thread-safe. There were some efforts in
> GDAL 1.3.x to make it thread safe, but the work does not seem to be
> finished. There some fundamental architectural misconceptions in OGR
> which prevents GDAL to be thread safe.
> However you should not care about all of that that during mutual access
> to two different shapes from two different threads. AFAIK the code in
> OGR related with PROJ.4's thread unsafety is guarded quite well.
>
> Regards
> Marek
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20060922/0a8f1fbd/attachment.html
More information about the Gdal-dev
mailing list