On Thu, 10 Nov 2022 11:03:25 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:

>> Chris Plummer has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Cleanup some suspect suspendOnStart and toBeResumed checks.
>
> src/jdk.jdwp.agent/share/native/libjdwp/threadControl.c line 841:
> 
>> 839:         debugMonitorNotifyAll(threadLock);
>> 840:         if ((node->suspendCount == 0) && node->toBeResumed) {
>> 841:             JDI_ASSERT(!node->suspendOnStart);
> 
> It'd be nice to add a small comment explaining why this asserted is here.

Ok. The root reason is to sanity check that removing this check from the `if` 
statement is in fact ok to do. I guess that might be obvious to someone looking 
at the diff, but not someone just looking at the above code. I'll try to come 
up with a reasonable comment.

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

PR: https://git.openjdk.org/jdk/pull/10922

Reply via email to