On this page
  1. threading.get_native_id
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

threading.get_native_id

Prev: threading.get_ident | Up: threading | Next: threading.getprofile
Rel: threading.active_count, threading.Barrier, threading.BoundedSemaphore, threading.BrokenBarrierError
Ref: docs.python.org — threading.get_native_id
Tags: #public #python3 #stdlib #threading


Import

import threading
from threading import get_native_id

Signature & Overview

threading.get_native_id()

Return a non-negative integer identifying the thread as reported by the OS (kernel). This may be used to uniquely identify a particular thread within a system.

Usage

import threading

tid = threading.get_native_id()
assert isinstance(tid, int) and tid > 0

Gotchas

REPL Inspect

from threading import get_native_id
help(get_native_id)

Linked from

Related notes