ID EN
Threading

get_native_id

Python 3.11

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).

Syntax

PYTHON
threading.get_native_id()

See Also

Availability