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().
........
This commit is contained in:
Antoine Pitrou 2009-10-30 17:25:12 +00:00
parent a2d1fe0b84
commit 65c9c6426b
5 changed files with 83 additions and 14 deletions

View file

@ -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: