[Checkins] SVN: zope.sendmail/trunk/ Give the background queue processor thread a name.

Marius Gedminas marius at pov.lt
Mon Feb 13 22:35:35 UTC 2012


Log message for revision 124392:
  Give the background queue processor thread a name.
  
  

Changed:
  U   zope.sendmail/trunk/CHANGES.txt
  U   zope.sendmail/trunk/src/zope/sendmail/queue.py
  U   zope.sendmail/trunk/src/zope/sendmail/tests/test_queue.py

-=-
Modified: zope.sendmail/trunk/CHANGES.txt
===================================================================
--- zope.sendmail/trunk/CHANGES.txt	2012-02-13 21:58:57 UTC (rev 124391)
+++ zope.sendmail/trunk/CHANGES.txt	2012-02-13 22:35:35 UTC (rev 124392)
@@ -15,6 +15,8 @@
 - Handle unicode usernames and passwords, encoding them to UTF-8. Fix for
   https://bugs.launchpad.net/zope.sendmail/+bug/597143
 
+- Give the background queue processor thread a name.
+
 3.7.2 (2010-04-30)
 ------------------
 

Modified: zope.sendmail/trunk/src/zope/sendmail/queue.py
===================================================================
--- zope.sendmail/trunk/src/zope/sendmail/queue.py	2012-02-13 21:58:57 UTC (rev 124391)
+++ zope.sendmail/trunk/src/zope/sendmail/queue.py	2012-02-13 22:35:35 UTC (rev 124392)
@@ -105,7 +105,8 @@
     interval = 3.0   # process queue every X second
 
     def __init__(self, interval=3.0):
-        threading.Thread.__init__(self)
+        threading.Thread.__init__(self,
+                name="zope.sendmail.queue.QueueProcessorThread")
         self.interval = interval
         self._lock = threading.Lock()
         self.setDaemon(True)

Modified: zope.sendmail/trunk/src/zope/sendmail/tests/test_queue.py
===================================================================
--- zope.sendmail/trunk/src/zope/sendmail/tests/test_queue.py	2012-02-13 21:58:57 UTC (rev 124391)
+++ zope.sendmail/trunk/src/zope/sendmail/tests/test_queue.py	2012-02-13 22:35:35 UTC (rev 124392)
@@ -42,6 +42,10 @@
     def tearDown(self):
         shutil.rmtree(self.dir)
 
+    def test_threadName(self):
+        self.assertEquals(self.thread.name,
+                          "zope.sendmail.queue.QueueProcessorThread")
+
     def test_parseMessage(self):
         hdr = ('X-Zope-From: foo at example.com\n'
                'X-Zope-To: bar at example.com, baz at example.com\n')



More information about the checkins mailing list