[Qgis-developer] New API for access to vector features

Frank Warmerdam warmerdam at pobox.com
Mon Jul 5 09:07:51 EDT 2010


Martin Dobias wrote:

> I was thinking about this. Having the possibility of simultaneous
> access for all providers would be indeed nice, though I'm not sure how
> feasible it would be: if the provider's backend has API that is not
> reentrant (e.g. it uses static variables), there isn't probably much
> we could do with in, only to use locking. But the good news is that
> most (if not all) of the current providers could be altered to allow
> simultaneous access from threads. So far I don't know how this would
> be handled in grass provider, and maybe there could be problems with
> some obscure OGR drivers.

Martin,

I failed to follow this thread closely.  How would you anticipate
implementing simultaneous access from multiple threads at all for OGR?
Currently you can never have multiple active feature iterators operating
against a particular layer in OGR because the feature iteration is "state"
of the OGRLayer and there can only be one OGRLayer representing a layer of
a datasource.

RFC 16 was intended to address this by allowing creation of clone OGRLayer's
but it was never adopted and implemented.

   http://trac.osgeo.org/gdal/wiki/rfc16_ogr_reentrancy

It seems that it isn't just "obscure OGR drivers", but all OGR drivers that
would fail to meet your desired level of service.

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    | Geospatial Programmer for Rent



More information about the Qgis-developer mailing list