summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-01-19 17:38:53 (GMT)
committerGeorg Brandl <georg@python.org>2008-01-19 17:38:53 (GMT)
commit6ebc52749cd06623f6b813f41987803887fbb929 (patch)
tree75ec3d80d156444615e0318acc6baf0dcfd037e3
parent6c29be54a5dbd97020ad14aad921cdccff41e62a (diff)
downloadcpython-6ebc52749cd06623f6b813f41987803887fbb929.zip
cpython-6ebc52749cd06623f6b813f41987803887fbb929.tar.gz
cpython-6ebc52749cd06623f6b813f41987803887fbb929.tar.bz2
Clarify thread.join() docs. #1873.
-rw-r--r--Doc/library/threading.rst13
1 files changed, 7 insertions, 6 deletions
diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst
index d5bd5d1..077ae01 100644
--- a/Doc/library/threading.rst
+++ b/Doc/library/threading.rst
@@ -622,18 +622,19 @@ impossible to detect the termination of alien threads.
When the *timeout* argument is present and not ``None``, it should be a floating
point number specifying a timeout for the operation in seconds (or fractions
- thereof). As :meth:`join` always returns ``None``, you must call
- :meth:`isAlive` to decide whether a timeout happened.
+ thereof). As :meth:`join` always returns ``None``, you must call :meth:`isAlive`
+ after :meth:`join` to decide whether a timeout happened -- if the thread is
+ still alive, the :meth:`join` call timed out.
When the *timeout* argument is not present or ``None``, the operation will block
until the thread terminates.
A thread can be :meth:`join`\ ed many times.
- :meth:`join` may throw a :exc:`RuntimeError`, if an attempt is made to join the
- current thread as that would cause a deadlock. It is also an error to
- :meth:`join` a thread before it has been started and attempts to do so raises
- same exception.
+ :meth:`join` raises a :exc:`RuntimeError` if an attempt is made to join
+ the current thread as that would cause a deadlock. It is also an error to
+ :meth:`join` a thread before it has been started and attempts to do so
+ raises the same exception.
.. method:: Thread.getName()