diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-04-19 21:58:51 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-04-19 21:58:51 (GMT) |
commit | 754851f456d0b97c86f2d700e032632323840e29 (patch) | |
tree | 366726362ecd8a4849b9fc402eddf6fb2acbf9a5 /Doc/library/threading.rst | |
parent | cf2a807831ee93ef39e73fcc682894b0695b6143 (diff) | |
download | cpython-754851f456d0b97c86f2d700e032632323840e29.zip cpython-754851f456d0b97c86f2d700e032632323840e29.tar.gz cpython-754851f456d0b97c86f2d700e032632323840e29.tar.bz2 |
Issue #11223: Add threading._info() function providing informations about the
thread implementation.
Skip test_lock_acquire_interruption() and test_rlock_acquire_interruption() of
test_threadsignals if a thread lock is implemented using a POSIX mutex and a
POSIX condition variable. A POSIX condition variable cannot be interrupted by a
signal (e.g. on Linux, the futex system call is restarted).
Diffstat (limited to 'Doc/library/threading.rst')
-rw-r--r-- | Doc/library/threading.rst | 24 |
1 files changed, 24 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 |