[Twisted-Python] Re: reactor.callLater ponderings (what i am trying to do) :)

jjanecek at telusplanet.net jjanecek at telusplanet.net
Sun Dec 14 22:12:24 MST 2003


I know i should have attended those english classes :(
Instead i was out smoking drugs and skipping english class to hack on my
computer. I am can not even use the excuse that english is not my native tongue :(.


Anyway in a nutshell i am making an rtp stack.
for the recieving part no problem.

Why I made the little clocking test program is because for rtp packets the
timing is very important. For audio the packet length is ussually 20ms.

I wanted to process the call inside a thread just because sometimes it has to
wait to read from the audio input. Surprisingly enuff it does not really make
that much difference if I call in thread or not.

when i am on my windows xp box, it would go at like 10ms with a correction only
needed like every 30 secs or so. That is using default reactor and windoze reactor.

for freebsd the finest I can get it is with 20ms it does not matter if i use
default reactor, poll reactor or kqueue. I just tried kqueue reactor since it 
sounded intresting :). 

For linux (red hat and mandrake) i tried both select reactor and poll reactor,
and it did not seem to make difference.

Anyway I will investigate Itamar's suggestions :

Nope. If you want high resolution you probably want
twisted.internet.task.LoopingCall.

Using itimer python extensions, and registering reactor.wakeUp() as the
signal handler for SIGALARM can also help.

and i will keep u guys informed with what i discover, thanx for your guys help :)





More information about the Twisted-Python mailing list