On Fri, 20 Nov 2020 19:59:52 GMT, Mandy Chung <mch...@openjdk.org> wrote:

>> Alan Bateman has updated the pull request with a new target base due to a 
>> merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains four additional 
>> commits since the last revision:
>> 
>>  - Fixed typo in @deprecated text
>>  - Merge
>>  - Update jshell class
>>  - 8256643: Terminally deprecate ThreadGroup stop, destroy, isDestroyed, 
>> setDaemon and isDaemon
>
> 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.

-------------

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

Reply via email to