Package twisted :: Package internet :: Module task :: Class LoopingCall
[frames | no frames]

Class LoopingCall


Call a function repeatedly.
Method Summary
  __init__(self, f, *a, **kw)
  _loop(self)
  start(self, interval)
Start running function every interval seconds.
  stop(self)
Stop running function.

Instance Variable Summary
  a: A tuple of arguments to pass the function.
  f: The function to call.
  kw: A dictionary of keyword arguments to pass to the function.

Class Variable Summary
NoneType call = None                                                                  
NoneType count = None                                                                  
NoneType deferred = None                                                                  
NoneType interval = None                                                                  
int running = 0                                                                     
NoneType starttime = None                                                                  

Method Details

start(self, interval)

Start running function every interval seconds.
Parameters:
interval - The number of seconds between calls. May be less than one. Precision will depend on the underlying platform, the available hardware, and the load on the system.
Returns:
A Deferred whose callback will be invoked with self when self.stop is called, or whose errback will be invoked if the function raises an exception.

stop(self)

Stop running function.

Instance Variable Details

a

A tuple of arguments to pass the function.

f

The function to call.

kw

A dictionary of keyword arguments to pass to the function.

Class Variable Details

call

Type:
NoneType
Value:
None                                                                  

count

Type:
NoneType
Value:
None                                                                  

deferred

Type:
NoneType
Value:
None                                                                  

interval

Type:
NoneType
Value:
None                                                                  

running

Type:
int
Value:
0                                                                     

starttime

Type:
NoneType
Value:
None                                                                  

Generated by Epydoc 2.0 on Sat May 15 20:08:26 2004 http://epydoc.sf.net