[Python-checkins] r69301 - python/trunk/Doc/library/threading.rst

georg.brandl python-checkins at python.org
Thu Feb 5 12:40:36 CET 2009


Author: georg.brandl
Date: Thu Feb  5 12:40:35 2009
New Revision: 69301

Log:
#5031: fix Thread.daemon property docs.

Modified:
   python/trunk/Doc/library/threading.rst

Modified: python/trunk/Doc/library/threading.rst
==============================================================================
--- python/trunk/Doc/library/threading.rst	(original)
+++ python/trunk/Doc/library/threading.rst	Thu Feb  5 12:40:35 2009
@@ -210,7 +210,7 @@
 A thread can be flagged as a "daemon thread".  The significance of this flag is
 that the entire Python program exits when only daemon threads are left.  The
 initial value is inherited from the creating thread.  The flag can be set
-through the :attr:`daemon` attribute.
+through the :attr:`daemon` property.
 
 There is a "main thread" object; this corresponds to the initial thread of
 control in the Python program.  It is not a daemon thread.
@@ -332,10 +332,11 @@
 
 .. attribute:: Thread.daemon
 
-   The thread's daemon flag. This must be set before :meth:`start` is called,
-   otherwise :exc:`RuntimeError` is raised.
-
-   The initial value is inherited from the creating thread.
+   A boolean value indicating whether this thread is a daemon thread (True) or
+   not (False).  This must be set before :meth:`start` is called, otherwise
+   :exc:`RuntimeError` is raised.  Its initial value is inherited from the
+   creating thread; the main thread is not a daemon thread and therefore all
+   threads created in the main thread default to :attr:`daemon` = ``False``.
 
    The entire Python program exits when no alive non-daemon threads are left.
 


More information about the Python-checkins mailing list