Package _emerge :: Module PipeReader :: Class PipeReader
[hide private]

Class PipeReader

source code

                        object --+            
                                 |            
portage.util.SlotObject.SlotObject --+        
                                     |        
     AsynchronousTask.AsynchronousTask --+    
                                         |    
         AbstractPollTask.AbstractPollTask --+
                                             |
                                            PipeReader

Reads output from one or more files and saves it in memory, for retrieval via the getvalue() method. This is driven by the scheduler's poll() loop, so it runs entirely within the current process.

Instance Methods [hide private]
 
_start(self) source code
 
_cancel(self)
Subclasses should implement this, as a template method to be called by AsynchronousTask.cancel().
source code
 
_wait(self) source code
 
getvalue(self)
Retrieve the entire contents
source code
 
close(self)
Free the memory buffer.
source code
 
_output_handler(self, fd, event) source code
 
_array_output_handler(self, fd, event) source code
 
_unregister(self)
Unregister from the scheduler and close open files.
source code

Inherited from AbstractPollTask.AbstractPollTask: isAlive

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

Inherited from portage.util.SlotObject.SlotObject: __init__, copy

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

Class Variables [hide private]

Inherited from AbstractPollTask.AbstractPollTask (private): _bufsize

Properties [hide private]
  _read_data
  _reg_ids
  _use_array
  input_files

Inherited from AbstractPollTask.AbstractPollTask: scheduler

Inherited from AsynchronousTask.AsynchronousTask: background, cancelled, returncode

Inherited from object: __class__

Method Details [hide private]

_start(self)

source code 
Overrides: AsynchronousTask.AsynchronousTask._start

_cancel(self)

source code 

Subclasses should implement this, as a template method to be called by AsynchronousTask.cancel().

Overrides: AsynchronousTask.AsynchronousTask._cancel
(inherited documentation)

_wait(self)

source code 
Overrides: AsynchronousTask.AsynchronousTask._wait

_unregister(self)

source code 

Unregister from the scheduler and close open files.

Overrides: AbstractPollTask.AbstractPollTask._unregister