pyxmpp2.mainloop.threads.ReadingThread

Package pyxmpp2 :: Package mainloop :: Module threads :: Class ReadingThread |
[hide private]

# Class ReadingThread

A thread reading from io_handler.

This thread will be also the one to call the IOHandler.prepare method until HandlerReady is returned.

It can be used (together with WrittingThread) instead of a main loop.

Instance Methods | [hide private]
__init__(self, settings, io_handler, name=None, daemon=True, exc_queue=None) x.__init__(...) initializes x; see help(type(x)) for signature |
run(self) The thread function. |
Inherited from `IOThread`: `is_alive`, `join`, `start`, `stop` Inherited from `IOThread` (private): `_run` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Instance Variables | [hide private]
Inherited from `IOThread`: `exc_info`, `io_handler`, `name`, `thread`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, settings, io_handler, name=None, 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. First, call the handler's 'prepare' method until it returns HandlerReady then loop waiting for the socket input and calling 'handle_read' on the handler. Overrides: IOThread.run