Windows - thread id change when a context switch happens
-
18-04-2021 - |
Question
Do Thread Id's change when a context switch (due to any reason) happens?
Solution
From http://msdn.microsoft.com/en-us/library/ms683183(v=vs.85).aspx:
GetCurrentThreadId()
Until the thread terminates, the thread identifier uniquely identifies the thread throughout the system.
OTHER TIPS
The thread ID of a thread cannot change. A thread's ID remains constant through the thread's lifetime.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow