On Nov 18, 2009, at 4:41 AM, Gagan Bansal wrote:

> Hi,
>
> Now I have achieved this by thread lock acquire and release.
> <snip>
> threadlock=thread.allocate_lock()
> global threadlock
>
> threadlock.acquire()
>
> # find intersection or nearest here
>
> threadlock.release()
> </snip>
>
> Thanks,
> Gagan

FWIW, I'm serializing access to my rtree with an HTTP server.

Tangent: David Beazley's presentation on performance-killing  
interactions between the GIL and threads is really interesting:

http://www.dabeaz.com/python/GIL.pdf
Google preview: http://tinyurl.com/y9gdtau

--
Sean Gillies
Programmer
Institute for the Study of the Ancient World
New York University

_______________________________________________
Community mailing list
[email protected]
http://lists.gispython.org/mailman/listinfo/community

Reply via email to