[Twisted-Python] Re: LoopingCall vs internet.TimerService

Saptarshi Guha sguha at purdue.edu
Tue Oct 2 20:05:43 EDT 2007

I did read the source that
a)LoopingCall is implemented via calllater's
b)internet.TimerService is a big wrapper around loopingcall

I've probably simplified it too much but what then is the difference?
thank you

Saptarshi Guha

On Oct 2, 2007, at 7:47 PM, Saptarshi Guha wrote:

> Hello,
> Thanks for twisted - very useful. Now, my questions
> I have written a server which accepts connections from clients,  
> takes requests and adds them to a Queue (a python object of  
> Queue.Queue).
> Now i have two approaches
> a) At startup, my server(a subclass of pb.Root)  runs a  
> "dispatcher" function using task.LoopingCall(dispatcher).start(0.1)
> b)Create a separate subclass of internet.TimerService whose  
> function is dispatcher
> [INFO: dispatcher has methods like obj.callRemote, addCallback and  
> addErrback]
> So which is better, neater, safer? loopingcall of timerservice?  
> also is it safe to do the calls mentioned in INFO within dispatcher?
> Thank you for your time and help.
> Saptarshi Guha
> Saptarshi Guha
> sapsi at pobox.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20071002/b128a427/attachment.htm 

More information about the Twisted-Python mailing list