Say, if I have a thread ID, can I be assured that it will be unique (for as long the thread is running) per process or throughout the OS (among all logged in users)?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, thread ID’s and Process ID’s on Windows are allocated from the same pool, so they will be unique. Once the thread or process ends however, the ID may be re-used by another thread or process.