[Pkg-bitcoin-commits] [python-quamash] 201/269: Better cleanup of timers and notifiers

Jonas Smedegaard dr at jones.dk
Fri Nov 24 11:26:33 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository python-quamash.

commit 0149edba5e78de100964991a13a4217468b221bf
Author: Mark Harviston <mark.harviston at gmail.com>
Date:   Tue Jan 13 01:18:04 2015 -0800

    Better cleanup of timers and notifiers
---
 quamash/__init__.py | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/quamash/__init__.py b/quamash/__init__.py
index ec3960f..16159f5 100644
--- a/quamash/__init__.py
+++ b/quamash/__init__.py
@@ -313,10 +313,19 @@ class QEventLoop(_baseclass):
 
 		super().close()
 
-		self.__timers = []
+		for timer in self.__timers:
+			if timer.isActive():
+				timer.stop()
+			del timer
+		self.__timers = None
+
 		self.__app = None
-		self._read_notifiers = {}
-		self._write_notifiers = {}
+
+		for notifier in (*self._read_notifiers, *self._write_notifiers):
+			notifer.setEnabled(False)
+
+		self._read_notifiers = None
+		self._write_notifiers = None
 
 	def call_later(self, delay, callback, *args):
 		"""Register callback to be invoked after a certain delay."""

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bitcoin/python-quamash.git



More information about the Pkg-bitcoin-commits mailing list