8322829: Refactor nioBlocker to avoid blocking while holding Thread's interrupt lock

Reviewed-by: jpai
This commit is contained in:
Alan Bateman 2024-01-09 07:05:27 +00:00
parent 07fce8eff2
commit 7286f5291d
6 changed files with 118 additions and 54 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -2374,7 +2374,7 @@ public final class System {
return klass.getEnumConstantsShared();
}
public void blockedOn(Interruptible b) {
Thread.blockedOn(b);
Thread.currentThread().blockedOn(b);
}
public void registerShutdownHook(int slot, boolean registerShutdownInProgress, Runnable hook) {
Shutdown.add(slot, registerShutdownInProgress, hook);