RFR: 8291429: java/lang/Thread/virtual/ThreadAPI.java timed out on single core system [v2]

Alan Bateman alanb at openjdk.org
Thu Oct 6 13:39:25 UTC 2022


On Wed, 5 Oct 2022 20:24:59 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> No, restoration requires a call to close. Maybe you are assuming that AutoCloseable implementations setup a cleaner to do that?
>
> Yes, that was my point of confusion. I thought collection triggered calling close, but I see now when you want it to be closed, you rely on try-with-resources to call close() method.

I've updated it to replace the use of try-with-resources with a try-finally that explicitly restores and maybe that will be easier to understand.

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

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


More information about the serviceability-dev mailing list