diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/threading.rst | 24 | ||||
-rw-r--r-- | Doc/whatsnew/3.3.rst | 8 |
2 files changed, 32 insertions, 0 deletions
diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst index df47045..dd2226d 100644 --- a/Doc/library/threading.rst +++ b/Doc/library/threading.rst @@ -175,6 +175,30 @@ 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 602b2b7..d3c9a97 100644 --- a/Doc/whatsnew/3.3.rst +++ b/Doc/whatsnew/3.3.rst @@ -112,6 +112,14 @@ connection when done:: (Contributed by Giampaolo RodolĂ in :issue:`9795`) +threading +--------- + +* The :mod:`threading` module has a new :func:`~threading._info` function which + provides informations about the thread implementation. + + (:issue:`11223`) + Optimizations ============= |