[geos-devel] Issues with smart pointers and threads?

Martin Davis mbdavis at VividSolutions.com
Tue May 27 19:48:07 EDT 2003


> This stuff tends to get tricky with multiple threads - are we
> considering thread safety in GEOS? It's going to be important for some
> applications (notably mine). Boost has good thread support. 

We'd like GEOS to be thread safe, of course.  What exactly are the issues involved with using smart pointers in conjunction with threads?  I would have assumed that as long as allocated memory was *not* shared between threads, you are safe in letting it get deleted when a smart pointer goes out of scope.  In GEOS, memory allocation should be completely thread-local - memory is only allocated in the context of Geometry methods, which are called by a single thread.

Martin Davis, Senior Technical Architect
Vivid Solutions Inc.
Suite #1A-2328 Government Street   Victoria, B.C.   V8T 5G5
Phone: (250) 385 6040    Fax: (250) 385 6046
EMail: mbdavis at vividsolutions.com  Web: www.vividsolutions.com

> 



More information about the geos-devel mailing list