LoopingCall vs internet.TimerService (Twisted)

S

sapsi

Hi,
I guess this is not the most appropriate forum but i tried the twisted
forum to not avail so here goes.

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]

I checked the source and it seems Loopingcall is implemented through
callLaters//Callbacks and TimerService has LoopingCall in it.

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
Saptarshi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top