I haven't needed this yet, but was going to shortly.  The read-only model is 
very interesting to me too.  Has anyone scoped the pain of supporting read-only 
concurrent access in development time? Days, weeks, ...? 

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Brent Pedersen
Sent: Tuesday, November 17, 2009 8:12 AM
To: gispython.org community projects
Subject: Re: [Community] rtree thread safe

On Tue, Nov 17, 2009 at 5:58 AM, Howard Butler <[email protected]> wrote:
>
> On Nov 17, 2009, at 5:05 AM, Gagan Bansal wrote:
>
>> Hi,
>>
>> I am using rtree to find the nearest roads from my road data set ( around 1 
>> million  road segments) and its working superb. But when I am testing it for 
>> user concurrency more than one, the error is thrown  'resource lock'. What 
>> could be the reason?
>>
>> I am loading the bounding box of roads initially from a file. Then I use the 
>> index to find the nearest. There is no insertion of the b-box later. Is 
>> there any option to freeze the index or read only ?
>
> rtree is not quite thread safe at this time (assuming you're using 0.5 or 
> trunk).  There is some capacity for thread safety and multi-threaded access 
> within libspatialindex, but there are some areas of the code that have not 
> been locked up yet.  Brent Pedersen has done some work in this area, and he 
> could provide more details.  Basically, the answer is we need some work 
> libspatialindex and possibly the Rtree bindings as well.  Short term, employ 
> the Big Ass Lock (TM) pattern ;)
>
> Howard
>
> _______________________________________________
> Community mailing list
> [email protected]
> http://lists.gispython.org/mailman/listinfo/community
>

yeah, i just did a work-around, forcing a web-app to be single threaded.
i created a ticket to track this:
http://trac.gispython.org/lab/ticket/195
-b
_______________________________________________
Community mailing list
[email protected]
http://lists.gispython.org/mailman/listinfo/community
_______________________________________________
Community mailing list
[email protected]
http://lists.gispython.org/mailman/listinfo/community

Reply via email to