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

Alan Bateman alanb at openjdk.org
Wed Oct 5 20:02:25 UTC 2022


On Wed, 5 Oct 2022 19:44:44 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> This test doesn't need to restore it so it doesn't keep a reference and not an issue if it is GC'ed.
>
> 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?

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

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


More information about the core-libs-dev mailing list