I could be wrong, but I thought that the new API was thread safe only if you used the _r versions of the method so that you can pass in a handle to the thread specific data. For example you can look at: badthreadtest.c and threadtest.c I was under the impression that the old API could be used in order to not break backwards compatibility. In order to accomplish this though, they use a global handle that gets initialized in initGEOS().
// NOTE: SRID will have to be changed after geometry creation GEOSContextHandle_t handle = NULL; If I am correct in order to use the thread safe API you would have to create a new handle for each thread and pass it to the new _r versions of all the methods. Am I missing something here? Is this done automatically somehow? Thanks, Aron On Mon, Jan 26, 2009 at 2:26 PM, Sean Gillies <[email protected]> wrote: > Aron, > > The GEOS 3.1 C API *is* the new thread safe API, and I've encountered > no problems with it yet. Shapely's tests pass. I encourage you to > checkout the Shapely trunk and try it. If you're interested, I could > introduce you to the zc.buildout configuration I am using to make > python, GEOS, and shapely development environments. > > Cheers, > Sean > > On Jan 26, 2009, at 1:17 PM, Aron Bierbaum wrote: > >> Has there been any work/testing to get Shapely to work with the new >> thread safe GEOS API? >> >> http://trac.osgeo.org/geos/wiki/RFC3 >> http://trac.osgeo.org/geos/ticket/210 >> http://trac.osgeo.org/geos/changeset/2232 >> >> I would be very interested in testing any changes that have been made >> to support this. >> >> Thanks, >> Aron >> _______________________________________________ >> Community mailing list >> [email protected] >> http://lists.gispython.org/mailman/listinfo/community > > > > -- > Sean Gillies > [email protected] > http://sgillies.net > > _______________________________________________ > Community mailing list > [email protected] > http://lists.gispython.org/mailman/listinfo/community > _______________________________________________ Community mailing list [email protected] http://lists.gispython.org/mailman/listinfo/community
