Use of eventlet has been introduced as a prototype implementation of
concurrent processing of a parent thread with UDP (and in time event
queue) handling. Python threads are annoying to work with at times, and
eventlet is a really transparent solution. Certainly other solutions
exist. This one is logical and has support in our spheres of influence.

The object model update has not yet been planned out, so I simply hacked
into regiondomain.py a new function to Region() called connect(). 
Region.connect initializes the agent on a region with a couple of simple
packet posts, then using eventlet.api.spawn, calls the function _connect
which runs a UDP packet loop. Each instance of the loop calls
api.sleep(0), which frees up other routines to do their thing.

A rough test of this is available in pyogp.interop.test_region_connect
(a unittest script).

One thing the use of eventlet introduces is a dependency on greenlet. To
install greenlet, see
https://wiki.secondlife.com/wiki/Pyogp/Client_Lib/The_Development_Sandbox#greenlet.

Ok, onto a prelim object model proposal next. Maybe. Unless something
shiny interferes...

~e
_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/pyogp

Reply via email to