After reading up on this answer and \"Linux Kernel Development\" by Robert Love and, subsequently, on the clone() system call, I discovered that processes and t
On Linux, every thread gets a thread ID. The thread ID of the main thread serves double duty as the process ID (and is rather well-known in the user interface). The thread ID is an implementation detail of Linux, and unrelated to the POSIX ID. For more details, refer to the gettid system call (not available from pure Python since it's system-specific).