From cfd68f9f2e942d929cf5abdc29fcea72cd64b48b Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Tue, 19 May 2020 14:40:59 +0200 Subject: [PATCH] python: remove unused queue --- python/src/deltachat/account.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/python/src/deltachat/account.py b/python/src/deltachat/account.py index 03c9f12d7..bc850017d 100644 --- a/python/src/deltachat/account.py +++ b/python/src/deltachat/account.py @@ -51,7 +51,6 @@ class Account(object): hook = hookspec.Global._get_plugin_manager().hook self._threads = iothreads.IOThreads(self) - self._hook_event_queue = queue.Queue() self._in_use_iter_events = False self._shutdown_event = Event() @@ -597,7 +596,6 @@ class Account(object): self.stop_ongoing() self._threads.stop(wait=False) lib.dc_close(dc_context) - self._hook_event_queue.put(None) self._threads.stop(wait=wait) # to wait for threads self._dc_context = None atexit.unregister(self.shutdown) @@ -605,16 +603,6 @@ class Account(object): hook = hookspec.Global._get_plugin_manager().hook hook.dc_account_after_shutdown(account=self, dc_context=dc_context) - def _handle_current_events(self): - """ handle all currently queued events and then return. """ - while 1: - try: - event = self._hook_event_queue.get(block=False) - except queue.Empty: - break - else: - event.call_hook() - def iter_events(self, timeout=None): """ yield hook events until shutdown.