# [Python-checkins] r54392 - python/trunk/Doc/lib/libthreading.tex

georg.brandl python-checkins at python.org
Thu Mar 15 08:38:16 CET 2007

Author: georg.brandl
Date: Thu Mar 15 08:38:14 2007
New Revision: 54392

Modified:
python/trunk/Doc/lib/libthreading.tex
Log:
Patch #1680978: consistently use "alive" instead of "active" in the
thread lib doc.

Modified: python/trunk/Doc/lib/libthreading.tex
==============================================================================
--- python/trunk/Doc/lib/libthreading.tex	(original)
+++ python/trunk/Doc/lib/libthreading.tex	Thu Mar 15 08:38:14 2007
@@ -15,10 +15,9 @@
This module defines the following functions and objects:

\begin{funcdesc}{activeCount}{}
-Return the number of currently active \class{Thread} objects.
-The returned count is equal to the length of the list returned by
+Return the number of \class{Thread} objects currently alive.  The
+returned count is equal to the length of the list returned by
\function{enumerate()}.
-A function that returns the number of currently active threads.
\end{funcdesc}

\begin{funcdesc}{Condition}{}
@@ -36,10 +35,10 @@
\end{funcdesc}

\begin{funcdesc}{enumerate}{}
-Return a list of all currently active \class{Thread} objects.
-The list includes daemonic threads, dummy thread objects created
-by \function{currentThread()}, and the main thread.  It excludes terminated
-threads and threads that have not yet been started.
+Return a list of all \class{Thread} objects currently alive.  The list
+includes daemonic threads, dummy thread objects created by
+\function{currentThread()}, and the main thread.  It excludes
+terminated threads and threads that have not yet been started.
\end{funcdesc}

\begin{funcdesc}{Event}{}
@@ -526,12 +525,9 @@
\method{run()} method in a separate thread of control.

Once the thread's activity is started, the thread is considered
-'alive' and 'active' (these concepts are almost, but not quite
-exactly, the same; their definition is intentionally somewhat
-vague).  It stops being alive and active when its \method{run()}
-method terminates -- either normally, or by raising an unhandled
-exception.  The \method{isAlive()} method tests whether the thread is
-alive.
+'alive'. It stops being alive when its \method{run()} method terminates
+-- either normally, or by raising an unhandled exception.  The
+\method{isAlive()} method tests whether the thread is alive.

Other threads can call a thread's \method{join()} method.  This blocks
the calling thread until the thread whose \method{join()} method is
@@ -551,14 +547,13 @@
initial thread of control in the Python program.  It is not a
daemon thread.

-There is the possibility that dummy thread objects'' are
-created.  These are thread objects corresponding to alien
-threads''.  These are threads of control started outside the
-threading module, such as directly from C code.  Dummy thread objects
-have limited functionality; they are always considered alive,
-active, and daemonic, and cannot be \method{join()}ed.  They are never
-deleted, since it is impossible to detect the termination of alien
-threads.
+There is the possibility that dummy thread objects'' are created.
+These are thread objects corresponding to alien threads'', which
+are threads of control started outside the threading module, such as
+directly from C code.  Dummy thread objects have limited
+functionality; they are always considered alive and daemonic, and
+cannot be \method{join()}ed.  They are never deleted, since it is
+impossible to detect the termination of alien threads.

\begin{classdesc}{Thread}{group=None, target=None, name=None,
@@ -646,7 +641,8 @@
Return whether the thread is alive.

Roughly, a thread is alive from the moment the \method{start()} method
-returns until its \method{run()} method terminates.
+returns until its \method{run()} method terminates. The module
+function \function{enumerate()} returns a list of all alive threads.
\end{methoddesc}

\begin{methoddesc}{isDaemon}{}
@@ -659,8 +655,8 @@

The initial value is inherited from the creating thread.

-The entire Python program exits when no active non-daemon
-threads are left.
+The entire Python program exits when no alive non-daemon threads are
+left.
\end{methoddesc}



More information about the Python-checkins mailing list