On Fri, 28 Oct 2022 01:47:44 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:
>> Thank you for explanation. >> Moving it inside critical section makes it more safe and clean. > > BTW, I also eventually realized that the `waiting_for_active_callbacks` flag > is not really even necessary. What is does is save having to do an > unnecessary notify each time `active_callbacks` goes back to 0. Instead it > only does the notify when it goes to 0 AND we are shutting down the debugger > connection. So it does help with performance a little, but I'm not sure if it > is even noticeable. Agreed. I'm for getting rid of this variable and simplifying the code. ------------- PR: https://git.openjdk.org/jdk/pull/10865