Skip to content

Commit

Permalink
Remove synchronized block in Thread isDead method
Browse files Browse the repository at this point in the history
Related: eclipse-openj9/openj9#20415
Related: eclipse-openj9/openj9#20414

Signed-off-by: Nathan Henderson <nathan.henderson@ibm.com>
  • Loading branch information
ThanHenderson committed Nov 13, 2024
1 parent 18b53f7 commit 354ae2b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/java.base/share/classes/java/lang/Thread.java
Original file line number Diff line number Diff line change
Expand Up @@ -3149,10 +3149,8 @@ private Thread(String vmName, Object vmThreadGroup, int vmPriority, boolean vmIs
}

private boolean isDead() {
// Has already started, is not alive anymore, and has been removed from the ThreadGroup
synchronized (interruptLock) {
return (started && (eetop == NO_REF));
}
/* Has already started and is not alive anymore. */
return started && (eetop == NO_REF);
}

Thread(Runnable runnable, String threadName, boolean isSystemThreadGroup, boolean inheritThreadLocals, boolean isDaemon, ClassLoader contextClassLoader) {
Expand Down

0 comments on commit 354ae2b

Please sign in to comment.