In Java concurrency, what makes a thread “active“? Just the fact that it’s not idling? Is a “waiting” or “suspended” thread still considered, technically, active?
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.
From what I can tell the term ‘active’ seems to be used a lot but not ever defined. The
ThreadGroup.enumerate()method is documented to:and from looking at the source for this, it is checking the
Thread.isAlive()method and adding those to the enumerable. From this I deduce that the terms ‘active’ and ‘alive’ are interchangeable and ‘alive’ is defined as: