diff options
author | Florent Le Coz <louiz@louiz.org> | 2014-07-20 20:46:03 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2014-07-20 20:46:03 +0200 |
commit | c2f6f077762282d311a6f876f94cc1a4eb9e805f (patch) | |
tree | 935725c968da27ea1713617fa6fffcf2edbdc299 /slixmpp/basexmpp.py | |
parent | 5ab77c745270d7d5c016c1dc7ef2a82533a4b16e (diff) | |
download | slixmpp-c2f6f077762282d311a6f876f94cc1a4eb9e805f.tar.gz slixmpp-c2f6f077762282d311a6f876f94cc1a4eb9e805f.tar.bz2 slixmpp-c2f6f077762282d311a6f876f94cc1a4eb9e805f.tar.xz slixmpp-c2f6f077762282d311a6f876f94cc1a4eb9e805f.zip |
Make xmlstream use an asyncio loop
Scheduled events, connection, TLS handshake (with STARTTLS), read and write
on the socket are all done using only asyncio.
A lot of threads, and thread-related (and thus useless) things still remain.
This is only a first step.
Diffstat (limited to 'slixmpp/basexmpp.py')
-rw-r--r-- | slixmpp/basexmpp.py | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/slixmpp/basexmpp.py b/slixmpp/basexmpp.py index 03557218..2d83385f 100644 --- a/slixmpp/basexmpp.py +++ b/slixmpp/basexmpp.py @@ -213,37 +213,12 @@ class BaseXMPP(XMLStream): log.warning('Legacy XMPP 0.9 protocol detected.') self.event('legacy_protocol') - def process(self, *args, **kwargs): - """Initialize plugins and begin processing the XML stream. - - The number of threads used for processing stream events is determined - by :data:`HANDLER_THREADS`. - - :param bool block: If ``False``, then event dispatcher will run - in a separate thread, allowing for the stream to be - used in the background for another application. - Otherwise, ``process(block=True)`` blocks the current - thread. Defaults to ``False``. - :param bool threaded: **DEPRECATED** - If ``True``, then event dispatcher will run - in a separate thread, allowing for the stream to be - used in the background for another application. - Defaults to ``True``. This does **not** mean that no - threads are used at all if ``threaded=False``. - - Regardless of these threading options, these threads will - always exist: - - - The event queue processor - - The send queue processor - - The scheduler - """ + def init_plugins(self, *args, **kwargs): for name in self.plugin: if not hasattr(self.plugin[name], 'post_inited'): if hasattr(self.plugin[name], 'post_init'): self.plugin[name].post_init() self.plugin[name].post_inited = True - return XMLStream.process(self, *args, **kwargs) def register_plugin(self, plugin, pconfig={}, module=None): """Register and configure a plugin for use in this stream. |