mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-15 21:05:11 +00:00
8278923: Document Klass::is_loader_alive
Reviewed-by: dholmes, iklam
This commit is contained in:
parent
f93beacd2f
commit
8cdead0c94
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2022, 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
|
||||
@ -44,6 +44,10 @@ inline bool Klass::is_non_strong_hidden() const {
|
||||
// Iff the class loader (or mirror for non-strong hidden classes) is alive the
|
||||
// Klass is considered alive. This is safe to call before the CLD is marked as
|
||||
// unloading, and hence during concurrent class unloading.
|
||||
// This returns false if the Klass is unloaded, or about to be unloaded because the holder of
|
||||
// the CLD is no longer strongly reachable.
|
||||
// The return value of this function may change from true to false after a safepoint. So the caller
|
||||
// of this function must ensure that a safepoint doesn't happen while interpreting the return value.
|
||||
inline bool Klass::is_loader_alive() const {
|
||||
return class_loader_data()->is_alive();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user