Revert "bpo-36084: Add native thread ID to threading.Thread objects (GH-11993)" (GH-13458)

This reverts commit 4959c33d25.
This commit is contained in:
Victor Stinner 2019-05-21 12:44:57 +02:00 committed by GitHub
parent 925af1d99b
commit d12e75734d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 2 additions and 133 deletions

View file

@ -85,18 +85,6 @@ This module defines the following constants and functions:
may be recycled when a thread exits and another thread is created.
.. function:: get_native_id()
Return the native integral Thread ID of the current thread assigned by the kernel.
This is a non-negative integer.
Its value may be used to uniquely identify this particular thread system-wide
(until the thread terminates, after which the value may be recycled by the OS).
.. availability:: Windows, FreeBSD, Linux, macOS.
.. versionadded:: 3.8
.. function:: stack_size([size])
Return the thread stack size used when creating new threads. The optional

View file

@ -49,18 +49,6 @@ This module defines the following functions:
.. versionadded:: 3.3
.. function:: get_native_id()
Return the native integral Thread ID of the current thread assigned by the kernel.
This is a non-negative integer.
Its value may be used to uniquely identify this particular thread system-wide
(until the thread terminates, after which the value may be recycled by the OS).
.. availability:: Windows, FreeBSD, Linux, macOS.
.. versionadded:: 3.8
.. function:: enumerate()
Return a list of all :class:`Thread` objects currently alive. The list
@ -309,25 +297,6 @@ since it is impossible to detect the termination of alien threads.
another thread is created. The identifier is available even after the
thread has exited.
.. attribute:: native_id
The native integral thread ID of this thread or ``0`` if the thread has not
been started. This is a non-negative integer. See the
:func:`get_native_id` function.
This represents the Thread ID (``TID``) as assigned to the
thread by the OS (kernel). Its value may be used to uniquely identify
this particular thread system-wide.
.. note::
Similar to Process IDs, Thread IDs are only valid (guaranteed unique
system-wide) from the time the thread is created until the thread
has been terminated.
.. availability:: Windows, FreeBSD, Linux, macOS.
.. versionadded:: 3.8
.. method:: is_alive()
Return whether the thread is alive.