[geos-devel] Concurrent access to geometry objects

Sandro Santilli strk at keybit.net
Tue Apr 15 01:27:35 PDT 2014


On Thu, Apr 10, 2014 at 08:19:02PM -0400, Daniel Komisar wrote:

> My first question is whether anyone can tell me if this is true or not, or
> if there are other parts of geometries which may be modified by const
> functions.

Envelope is the only one, for the Geometry class.
There are more mutable members around the code though, see:

 grep -R mutable 

> If that is not possible I would be willing to do the work to add to geos
> whatever is necessary so that this can be done, if the work would be
> accepted into geos and if I can get some guidance on the best way to do it.

Improving multi-threaded usecases is a welcome contribution.

> A related question - is there any reason the factory functions are not
> virtual? It seems as if it makes the factory not very useful as you can't
> inject your own types into the mix. It seems like if they were it could be
> used to create objects with synchronization primitives in them and thus
> solve my problem.

No reason, other than focus having mostly been on the C-API
and no subclasses available/needed in the code. I guess it
would be nice to expose a way to provide external factories
trough the C-API too, btw.

--strk;

 ()  ASCII ribbon campaign  --  Keep it simple !
 /\  http://strk.keybit.net/rants/ascii_mails.txt  


More information about the geos-devel mailing list