diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-04-30 12:53:09 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-04-30 12:53:09 (GMT) |
commit | d5c355ccc70d011ef2010537838d9a82e24b2b80 (patch) | |
tree | 93cd12a87150e673d0a8b16c04ffcaff16fea3aa /Doc | |
parent | fab6c70770c7c895a4dbd898a963e2c52da72c04 (diff) | |
download | cpython-d5c355ccc70d011ef2010537838d9a82e24b2b80.zip cpython-d5c355ccc70d011ef2010537838d9a82e24b2b80.tar.gz cpython-d5c355ccc70d011ef2010537838d9a82e24b2b80.tar.bz2 |
Issue #11223: Replace threading._info() by sys.thread_info
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/sys.rst | 29 | ||||
-rw-r--r-- | Doc/library/threading.rst | 24 | ||||
-rw-r--r-- | Doc/whatsnew/3.3.rst | 8 |
3 files changed, 33 insertions, 28 deletions
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index ba781b3..a34c497 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -961,6 +961,35 @@ always available. to a console and Python apps started with :program:`pythonw`. +.. data:: thread_info + + A :term:`struct sequence` holding information about the thread + implementation. + + +------------------+---------------------------------------------------------+ + | Attribute | Explanation | + +==================+=========================================================+ + | :const:`name` | Name of the thread implementation: | + | | | + | | * ``'nt'``: Windows threads | + | | * ``'os2'``: OS/2 threads | + | | * ``'pthread'``: POSIX threads | + | | * ``'solaris'``: Solaris threads | + +------------------+---------------------------------------------------------+ + | :const:`lock` | Name of the lock implementation: | + | | | + | | * ``'semaphore'``: a lock uses a semaphore | + | | * ``'mutex+cond'``: a lock uses a mutex | + | | and a condition variable | + | | * ``None`` if this information is unknown | + +------------------+---------------------------------------------------------+ + | :const:`version` | Name and version of the thread library. It is a string, | + | | or ``None`` if these informations are unknown. | + +------------------+---------------------------------------------------------+ + + .. versionadded:: 3.3 + + .. data:: tracebacklimit When this variable is set to an integer value, it determines the maximum number diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst index dd2226d..df47045 100644 --- a/Doc/library/threading.rst +++ b/Doc/library/threading.rst @@ -175,30 +175,6 @@ This module defines the following functions and objects: Availability: Windows, systems with POSIX threads. -.. function:: _info() - - Return a dictionary with informations about the thread implementation. - The ``'name'`` key gives the name of the thread implementation (string): - - * ``'nt'``: Windows threads - * ``'os2'``: OS/2 threads - * ``'pthread'``: POSIX threads - * ``'solaris'``: Solaris threads - - POSIX threads have two more keys: - - * ``'lock_implementation'`` (string): name of the lock - implementation - - * ``'semaphore'``: a lock uses a semaphore - * ``'mutex+cond'``: a lock uses a mutex and a condition variable - - * ``'pthread_version'`` (string, optional): name and version of the pthread - library - - .. versionadded:: 3.3 - - This module also defines the following constant: .. data:: TIMEOUT_MAX diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst index a26fe75..93da9d8 100644 --- a/Doc/whatsnew/3.3.rst +++ b/Doc/whatsnew/3.3.rst @@ -112,11 +112,11 @@ connection when done:: (Contributed by Giampaolo RodolĂ in :issue:`9795`) -threading ---------- +sys +--- -* The :mod:`threading` module has a new :func:`~threading._info` function which - provides informations about the thread implementation. +* The :mod:`sys` module has a new :func:`~sys.thread_info` :term:`struct + sequence` holding informations about the thread implementation. (:issue:`11223`) |