On Wed, 5 Oct 2022 19:44:44 GMT, Chris Plummer <cjplum...@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