Package brisa :: Package core :: Module ireactor :: Class ReactorInterface
[hide private]
[frames] | no frames]

Class ReactorInterface

source code

         object --+    
                  |    
singleton.Singleton --+
                      |
                     ReactorInterface

Basic reactor interface capable of handling fds and timers.

Nested Classes [hide private]

Inherited from singleton.Singleton: __metaclass__

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
add_timer(self, interval, callback, threshold)
Add timer.
source code
 
rem_timer(self, timer_id)
Removes a timer.
source code
 
add_fd(self, fd, event_callback, event_type)
Adds a fd for watch.
source code
 
rem_fd(self, fd)
Removes a fd from being watched.
source code
 
add_after_stop_func(self, func)
Registers a function to be called before entering the STOPPED state.
source code
 
rem_after_stop_func(self, func)
Removes a registered function.
source code
 
add_before_start_func(self, func)
Registers a function to be called before entering the RUNNING state.
source code
 
rem_before_start_func(self, func)
Removes a registered function.
source code
 
main_loop_iterate(self)
Runs a single iteration of the main loop.
source code
 
main(self)
Enters the RUNNING state by running the main loop until main_quit() is called.
source code
 
main_quit(self)
Terminates the main loop.
source code
 
is_running(self)
Returns True if the main loop is running.
source code

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

Class Variables [hide private]
  state = REACTOR_STATE_STOPPED
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

add_timer(self, interval, callback, threshold)

source code 

Add timer.

Note: should return an ID assigned to the timer, so that it can be removed by rem_timer().

main_loop_iterate(self)

source code 

Runs a single iteration of the main loop. Reactor enters the RUNNING state while this method executes.

is_running(self)

source code 

Returns True if the main loop is running. Otherwise returns False.