[Medusa-dev] medusa & asyncore.loop -- termination & GUI

Hal Wine hal at dtor.com
Wed Apr 9 18:50:04 EDT 2003



Gregory P. Smith wrote:
> (a) "make your own asyncore.loop"
> 
> Is actually a good option.  There is no reason that the event loop
> shouldn't handle other events as well as socket I/O.  (look at
> twistedmatrix.com's twisted-python library for example)

Right, from the ground up, that's the way to go.
> 
> In virtually all of the asyncore based code I've written I've ended up
> using my own version of the loop for very similar reasons.

Have you ever been bit by python's asyncore module getting out of 
phase with medusa releases? (It doesn't appear that the asyncore.loop 
API and functionality has changed in ages, but I'm relatively new to 
Python.)

Somewhere post 1.5.2, asyncore.poll3 was introduced, and map became an 
arguement. But I guess if you're using a GUI, you don't need the 
efficiencies of poll over select, so no problems. (I note twisted's 
asyncoresupport uses select regardless, and ignores the map parameter.)

Okay, makes sense to me (sorry for thinking out loud)

Thanks, George!
--Hal




More information about the Medusa-dev mailing list