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

Chris Plummer cjplummer at openjdk.org
Wed Oct 5 20:27:12 UTC 2022


On Wed, 5 Oct 2022 19:58:24 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> It's not a matter of whether or not the test needs to restore it. It _will_ restore it if there is a GC, and if this happens before the test completes, it could find itself without enough carrier threads.
>
> 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.

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

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


More information about the core-libs-dev mailing list