<AWT Dev> RFR: 8256643: Terminally deprecate ThreadGroup stop, destroy, isDestroyed,… [v2]

Alan Bateman alanb at openjdk.java.net
Sun Nov 22 16:05:24 UTC 2020

On Fri, 20 Nov 2020 20:12:31 GMT, Stuart Marks <smarks at openjdk.org> wrote:

>> Marked as reviewed by mchung (Reviewer).
> I think the current deprecation wording is actually too specific regarding the raciness between TG destruction and created-but-not-started threads. That's just one of the flaws of thread groups. In fact, I think there are enough weirdnesses and race conditions around all destruction-related operations of thread groups that the whole concept is fundamentally flawed. We should just say that. How about this:
>> ThreadGroup's destruction mechanisms are fundamentally flawed. Therefore, the ThreadGroup methods destroy(), isDestroyed(), setDaemon(), and isDaemon(), which relate to ThreadGroup destruction, have been deprecated and may be removed from a future version of the system.
> I think there are too many subtle details to include a justification here about why TG destruction is fundamentally flawed, so we just have to assert that. Unfortunately the writeups in the JEP and CSR are in draft state so we can't link to them. Maybe when the JEP is published we can add a link to it from here later.

Okay, I think I agree that the first sentence needs to be a bit more general so I've re-worded it. I used "inherently" rather than "fundamentally" to be consistent with the other deprecation text in Thread/ThreadGroup. If you are okay with the updated text then I'll transfer it to the CSR.


PR: https://git.openjdk.java.net/jdk/pull/1318

More information about the awt-dev mailing list