summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-02-05 11:40:35 (GMT)
committerGeorg Brandl <georg@python.org>2009-02-05 11:40:35 (GMT)
commitecd2afa4523fa11da4e354b126f7b49add0c6af2 (patch)
tree7c229b38aeb6c577dd1a1f474e486bbc7e56208a /Doc
parent85c5ccfab94012b2a7c5f3e98014a75be4b06c52 (diff)
downloadcpython-ecd2afa4523fa11da4e354b126f7b49add0c6af2.zip
cpython-ecd2afa4523fa11da4e354b126f7b49add0c6af2.tar.gz
cpython-ecd2afa4523fa11da4e354b126f7b49add0c6af2.tar.bz2
#5031: fix Thread.daemon property docs.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/threading.rst11
1 files changed, 6 insertions, 5 deletions
diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst
index 85860e5..e6616db 100644
--- a/Doc/library/threading.rst
+++ b/Doc/library/threading.rst
@@ -210,7 +210,7 @@ changed through the :attr:`name` attribute.
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 @@ impossible to detect the termination of alien threads.
.. 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.