ThreadGroup.enumerate/activeCount - any good reason not to deprecate?

Alan Bateman Alan.Bateman at oracle.com
Wed Jun 3 18:40:27 UTC 2020


On 03/06/2020 18:47, Paul Sandoz wrote:
> It’s tempting to go all out and investigate the deprecation of (not for removal) ThreadGroup in its entirety, and also deprecate the Thread constructors accepting ThreadGroup, related methods in SecurityManager, etc. I suspect that’s probably more work than you want to take on right now, and maybe there is still some salvageable functionality.
>
I've held back from deprecating ThreadGroup in its entirety, at least 
for now, because the notion of a group of threads, or even tree of 
groups, isn't too toxic and there may be herding or other grouping needs 
in the future that might mean ThreadGroup comes backs in a different 
form. Also anything we do here has to take the debugger support into 
consideration, hence the prototype efforts to reconstitute the list of 
threads in order to keeping JVMTI working.

Deprecating the specific methods mentioned here, plus a few others that 
I didn't mention in this discussions, means that the only non-deprecated 
methods would be  getName, getParent, parentOf, checkAccess and 
uncaughtException. Yes, that is kinda sad but it doesn't preclude us 
from deprecating the entire class in the future.

-Alan.





More information about the core-libs-dev mailing list