[Twisted-Python] integrating CompStrm//adding background processing

Bill la Forge laforge49 at yahoo.co.in
Mon May 17 00:14:08 EDT 2004

It isn't that I want to call a function with a particular frequency. Rather, 
I want to call a function once per main loop. Further, when the function
is available to be called, I want to run with a timeout of 0 to further
increase the frequency of calls. LoopingCall still uses callLater which 
simply can not deliver this type of service.
My view on things is that, while blocking I/O is best put in another 
thread, computations that can be broken into small pieces (putting
yield statements in every loop, for example) can run very nicely in the
background. Between each chunck of processing, you check for any
timer events and for I/O completions, of course. But you want to execute
these small chuncks AS FREQUENTLY AS POSSIBLE.
But like I said, I'm developing a new style of async programming. So
its bound to be something of a heresy. ;-)

Itamar Shtull-Trauring <itamar at itamarst.org> wrote:
The suggested way for doing highly frequent calls to scheduled events in
twisted is twisted.internet.task.LoopingCall.
Yahoo! India Matrimony: Find your partner online.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20040517/de7cf519/attachment.htm 

More information about the Twisted-Python mailing list