Package portage :: Package util :: Package _async :: Module TaskScheduler :: Class TaskScheduler
[hide private]

Class TaskScheduler

source code

                           object --+            
                                    |            
                SlotObject.SlotObject --+        
                                        |        
_emerge.AsynchronousTask.AsynchronousTask --+    
                                            |    
                               object --+   |    
                                        |   |    
      _emerge.PollScheduler.PollScheduler --+    
                                            |    
                AsyncScheduler.AsyncScheduler --+
                                                |
                                               TaskScheduler

A simple way to handle scheduling of AbstractPollTask instances. Simply pass a task iterator into the constructor and call start(). Use the poll, wait, or addExitListener methods to be notified when all of the tasks have completed.

Instance Methods [hide private]
 
__init__(self, task_iter, **kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
_next_task(self) source code

Inherited from _emerge.AsynchronousTask.AsynchronousTask: addExitListener, addStartListener, cancel, isAlive, poll, removeExitListener, removeStartListener, start, wait

Inherited from SlotObject.SlotObject: copy

Inherited from _emerge.PollScheduler.PollScheduler: terminate

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

Class Variables [hide private]
Properties [hide private]

Inherited from _emerge.AsynchronousTask.AsynchronousTask: background, cancelled, returncode

Inherited from object: __class__

Method Details [hide private]

__init__(self, task_iter, **kwargs)
(Constructor)

source code 

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

Parameters:
  • main - If True then use global_event_loop(), otherwise use a local EventLoop instance (default is False, for safe use in a non-main thread)
Overrides: object.__init__
(inherited documentation)

_next_task(self)

source code 
Overrides: AsyncScheduler.AsyncScheduler._next_task