diff options
| author | Jake Tesler <jake.tesler@gmail.com> | 2019-05-22 08:43:17 -0700 |
|---|---|---|
| committer | Victor Stinner <vstinner@redhat.com> | 2019-05-22 17:43:16 +0200 |
| commit | b121f63155d8e3c7c42ab6122e36eaf7f5e9f7f5 (patch) | |
| tree | f8e48c2d296e82b1378bb2bf25a34e1ca8321c85 /Doc/library/_thread.rst | |
| parent | b3be4072888a4ce054993c2801802721466ea02d (diff) | |
| download | cpython-git-b121f63155d8e3c7c42ab6122e36eaf7f5e9f7f5.tar.gz | |
bpo-36084: Add native thread ID (TID) to threading.Thread (GH-13463)
Add native thread ID (TID) to threading.Thread objects
(supported platforms: Windows, FreeBSD, Linux, macOS).
Diffstat (limited to 'Doc/library/_thread.rst')
| -rw-r--r-- | Doc/library/_thread.rst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/library/_thread.rst b/Doc/library/_thread.rst index acffabf24b..d7814f218b 100644 --- a/Doc/library/_thread.rst +++ b/Doc/library/_thread.rst @@ -85,6 +85,18 @@ 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 |
