RFR: 8219197: ThreadGroup.enumerate() may return wrong value
Daniel Fuchs
daniel.fuchs at oracle.com
Wed Mar 13 16:47:50 UTC 2019
Hi Pavel,
On 13/03/2019 16:35, Pavel Rappo wrote:
> Using a bunch of Semaphores here seems a bit surprising. One more CountDownLatch
> or CyclicBarrier *might* have been better. But I guess it's not of concern.
Agreed, but I won't change it. The reason is that I had a more
extensive version of the test with which I tested a prototype
fix for another related ThreadGroup issue - and the semaphore
as opposed to latches were useful for that ;-)
That other issue is still in my TODO list - but I might take more
time to get to it as its fix is a bit more controversial.
> For the diagnostic purposes I would add a newline between
>
> t4.join(); t3.join();
>
> since they throw exceptions. Otherwise looks good. Thanks for doing this.
OK, will do.
Thanks for the feedback!
-- daniel
More information about the core-libs-dev
mailing list