From c2f6f077762282d311a6f876f94cc1a4eb9e805f Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 20 Jul 2014 20:46:03 +0200 Subject: 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. --- slixmpp/basexmpp.py | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) (limited to 'slixmpp/basexmpp.py') 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. -- cgit v1.2.3