[Twisted-Python] twisted & pydispatcher?

Mike C. Fletcher mcfletch at rogers.com
Sun Aug 21 18:16:18 EDT 2005


Henning.Ramm at mediapro-gmbh.de wrote:

>Hi ho!
>
>Would you recommend or discourage using pyDispatcher in a twisted application?
>Are there any known traps?
>  
>
We use PyDispatcher + Twisted extensively in Cinemon.  Thing to keep in 
mind is that PyDispatcher is *synchronous*, so if you have a large 
number of handlers/observers registered for a given event you could 
stall Twisted as you process the one event.  We often use a callLater( 
0, send ) pattern to move the event processing into its own "timeslice" 
for heavily-observed events.

Good luck,
Mike

-- 
________________________________________________
  Mike C. Fletcher
  Designer, VR Plumber, Coder
  http://www.vrplumber.com
  http://blog.vrplumber.com





More information about the Twisted-Python mailing list