[Opensim-dev] Threads, threads, threads and more threads

diva at metaverseink.com diva at metaverseink.com
Fri Jul 31 14:16:11 UTC 2009


Teravus Ovares wrote:
> The way OpenSimulator is structured, I really think we need to have
> that root agent UDP thread be a full thread.   It handles a LOT more
> then the child agents currently.

Yes, you're probably right. I was referring to all the other threads 
that send things to the client. There's one that sends images, not sure 
if there's another that sends non-image assets. I'll have to revisit the 
code to find all those thread loops again...

> As far as I know (feel free to correct me if I'm wrong though) , the
> child agent, however, does only few things..    Object Updates.
> Terrain changes, and connection keepalive.

Yes, it does very little. The main LLClientView thread spwans other 
threads like the texture sender. I'm not sure the texture sender (and 
others like it) are necessary or wanted. I'm not sure they aren't either 
:-) But since you're bringing this issue up, I thought I'd bring these 
up for discussion.

> It would almost make sense to have the child agent be a full thread
> for a short time and then be relegated to a worker thread after some
> event.   That event could be a certain packet processing threshold is
> reached..   or..   the terrain and the objects have been sent to the
> client.

This dynamic behavior may become complicated to manage. It might be 
simpler/better to treat child agents in a special way from the very 
beginning? Or simply eliminate all other auxiliary threads except the 
main LLClientView thread?




More information about the Opensim-dev mailing list