Re: [gdal-dev] Is GDAL reentrant

2008-11-10 Thread Frank Warmerdam

Clay, Bruce wrote:
I have a Microsoft application with multiple tabs / property pages. 
 Each tab is controlled by a separate class.  I have a separate instance 
of GDAL in each class.  I also had an instance in a popup that I used to 
connect to the database.  After the user logins and the popup window 
goes away it seems that I have to reregister the OGR drivers in the tabs 
as if the OGRCleanupAll in the destructor of the popup was being applied 
to the instances in the tabs as well.


 

Is GDAL / OGR reentrant?  Can we have multiple instances that act 
independently?


Bruce,

GDAL/OGR is endeavors to achieve some forms of re-entrancy.  In particular
it should be possible to have distinct threads accessing distinct
GDALDataset objects in read-only mode for well behaved drivers.  This
is also generally true of OGRDataSource objects.

However, a call to OGRCleanupAll() or other similar funcitions that
tear down the environment should only generally be done on application
exit, not cleanup of a single thread.

Best regards,
--
---+--
I set the clouds in motion - turn up   | Frank Warmerdam, [EMAIL PROTECTED]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Is GDAL reentrant

2008-11-07 Thread Clay, Bruce
I have a Microsoft application with multiple tabs / property pages.
Each tab is controlled by a separate class.  I have a separate instance
of GDAL in each class.  I also had an instance in a popup that I used to
connect to the database.  After the user logins and the popup window
goes away it seems that I have to reregister the OGR drivers in the tabs
as if the OGRCleanupAll in the destructor of the popup was being applied
to the instances in the tabs as well.

 

Is GDAL / OGR reentrant?  Can we have multiple instances that act
independently?

 

 

Bruce

 




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev