diff options
author | Jake Tesler <jake.tesler@gmail.com> | 2019-05-12 17:08:24 (GMT) |
---|---|---|
committer | Antoine Pitrou <antoine@python.org> | 2019-05-12 17:08:24 (GMT) |
commit | 4959c33d2555b89b494c678d99be81a65ee864b0 (patch) | |
tree | 87df7778f170864ef1efe3418ac3cb3c47051c50 /Doc/library/_thread.rst | |
parent | 87068ed00927bdeaa2ae556e4241c16cf8a845eb (diff) | |
download | cpython-4959c33d2555b89b494c678d99be81a65ee864b0.zip cpython-4959c33d2555b89b494c678d99be81a65ee864b0.tar.gz cpython-4959c33d2555b89b494c678d99be81a65ee864b0.tar.bz2 |
bpo-36084: Add native thread ID to threading.Thread objects (GH-11993)
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 acffabf..d7814f2 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 |