Package qubx :: Module task :: Class TaskManager
[hide private]
[frames] | no frames]

Class TaskManager

source code

object --+
         |
        TaskManager

Maintains a list of running tasks; can interrupt one or all; use global variable Tasks."

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
add_task(self, task)
Add task to the list of running, interruptible tasks.
source code
 
remove_task(self, task)
Remove task from the running list.
source code
 
__onTerminate(self, task) source code
 
set_busy(self, task) source code
 
unset_busy(self, task) source code
 
interrupt(self, task=None)
Raises KeyboardInterrupt in one Task, or in all if tid=None.
source code

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

Instance Variables [hide private]
  OnAdd
qubx.util_types.WeakEvent(TaskManager, Task)
  OnRemove
qubx.util_types.WeakEvent(TaskManager, Task)
  busy
list of running, non-interruptible Tasks
  deferred
list of busy tasks to be interrupted when possible
  interruptible
list of running, interruptible Tasks
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

remove_task(self, task)

source code 

Remove task from the running list. Task must not be busy (in main_hold).