Package brisa :: Package utils :: Module looping_call :: Class LoopingCall
[hide private]
[frames] | no frames]

Class LoopingCall

source code

object --+
         |
        LoopingCall

Class that performs repeated function calls in a interval.

Instance Methods [hide private]
 
__init__(self, f, *a, **kw)
Constructor for the LoopingCall class.
source code
 
is_running(self)
Returns True if the looping call is active, otherwise False.
source code
 
start(self, interval, now=True)
Starts the function calls in the interval specified.
source code
 
stop(self)
Stops the LoopingCall.
source code
 
destroy(self) source code
 
_cleanup(self) source code
 
_register(self) source code
 
_unregister(self) source code
 
_call(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  msg_already_started = 'tried to start() LoopingCall when alrea...
  msg_already_stopped = 'tried to stop() LoopingCall when alread...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, f, *a, **kw)
(Constructor)

source code 

Constructor for the LoopingCall class.

Overrides: object.__init__

start(self, interval, now=True)

source code 

Starts the function calls in the interval specified. If now is False, it waits the interval before starting doing calls.

Parameters:
  • interval (float) - interval between calls
  • now (boolean) - whether it will start calling now or not

Class Variable Details [hide private]

msg_already_started

Value:
'tried to start() LoopingCall when already started'

msg_already_stopped

Value:
'tried to stop() LoopingCall when already stopped'