summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-10-30 17:25:12 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2009-10-30 17:25:12 (GMT)
commit65c9c6426b719d885f12938a2c5ab938558406ab (patch)
tree4e4dbbf398d78a6bf2003d3a56635b9f0fa7582d /Doc
parenta2d1fe0b843b27130d0e3194ac2f517692e89c85 (diff)
downloadcpython-65c9c6426b719d885f12938a2c5ab938558406ab.zip
cpython-65c9c6426b719d885f12938a2c5ab938558406ab.tar.gz
cpython-65c9c6426b719d885f12938a2c5ab938558406ab.tar.bz2
Merged revisions 75958 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r75958 | antoine.pitrou | 2009-10-30 18:07:08 +0100 (ven., 30 oct. 2009) | 7 lines Issue #7222: Make thread "reaping" more reliable so that reference leak-chasing test runs give sensible results. The previous method of reaping threads could return successfully while some Thread objects were still referenced. This also introduces a new private function: :func:hread._count(). ........
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/_thread.rst13
1 files changed, 13 insertions, 0 deletions
diff --git a/Doc/library/_thread.rst b/Doc/library/_thread.rst
index cb62407..373b1b0 100644
--- a/Doc/library/_thread.rst
+++ b/Doc/library/_thread.rst
@@ -103,6 +103,19 @@ It defines the following constant and functions:
Availability: Windows, systems with POSIX threads.
+.. function:: _count()
+
+ Return the number of currently running Python threads, excluding the main
+ thread. The returned number comprises all threads created through
+ :func:`start_new_thread` as well as :class:`threading.Thread`, and not
+ yet finished.
+
+ This function is meant for internal and specialized purposes only. In
+ most applications :func:`threading.enumerate()` should be used instead.
+
+ .. versionadded:: 3.2
+
+
Lock objects have the following methods: