Package pyxmpp2 :: Package mainloop :: Module threads :: Class IOThread
[hide private]

Class IOThread


Base class for ReadingThread and WrittingThread.
Instance Methods [hide private]
 
__init__(self, settings, io_handler, name, daemon=True, exc_queue=None)
x.__init__(...) initializes x; see help(type(x)) for signature
 
start(self)
Start the thread.
 
is_alive(self)
Check if the thread is alive.
 
stop(self)
Request the thread to stop.
 
join(self, timeout)
Join the thread (wait until it stops).
 
_run(self)
The thread function.
 
run(self)
The thread function.

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

Instance Variables [hide private]
(type, value, traceback) tuple exc_info
this will hold exception information tuple for the last exception raised in the thread.
  exc_queue
queue to put all exceptions raised in the thread.
IOHandler io_handler
the I/O handler object to poll
unicode name
thread name (for debugging)
threading.Thread thread
the actual thread object
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, settings, io_handler, name, daemon=True, exc_queue=None)
(Constructor)

 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)

_run(self)

 
The thread function. Calls self.run() in loop and if it raises an exception, stores it in self.exc_queue. If exc_queue is None the exception will abort the thread.