[Opensim-dev] BlockingQueue

Justin Clark-Casey jjustincc at googlemail.com
Wed Mar 26 11:25:48 UTC 2008


Stefan Andersson wrote:
> aka "The abomination that shall not be named"
>
> Preparing for the bug-a-thon friday, I want us to come together on how 
> we will write this out of the core; I think it will give us much 
> better control over threading and deadlocking.
For people relatively new to the project, could you give any examples of 
particular problems here?

>
> (The PROBLEM with the BlockingQueue is that threads might LOCK 
> unknowingly because a sub-call felt like taking a peek at some 
> blocking queue. Really really bad form.)
Could you be more specific?  Looking at OpenSim.Framework.BlockingQueue, 
I can't see where deadlock could occur - none of the methods hold on to 
the m_queueSync lock for long.  However, I'm relatively new to 
synchronization in dot net, though I have done some in Java - I could be 
missing something.

>
> The BlockingQueue is used in the following contexts:
>
> * Serving AssetRequests
>   - This should be solved with a specialized ThreadStart queue that 
> news up threads whenever something tries to add to it or if there's 
> something in the queue, up to a specified max of concurrent requests.
Isn't starting up threads an expensive process?  Perhaps a ThreadPool 
instead if we wanted to go down that route?

>
> I'm very motivated at doing this on friday, so give me your feedback 
> ASAP, please.
>
> Best,
> Stefan
> ------------------------------------------------------------------------
>
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
>   




More information about the Opensim-dev mailing list