< prev index next > src/hotspot/share/classfile/classLoaderData.hpp
klass is_unloading no cache v2
// GC interface.
void clear_claimed() { _claimed = 0; }
bool claimed() const { return _claimed == 1; }
bool claim();
+ // Computes if the CLD is alive or not. This is safe to call in concurrent
+ // contexts.
bool is_alive() const;
// Accessors
ClassLoaderMetaspace* metaspace_or_null() const { return _metaspace; }
ClassLoaderMetaspace* metaspace_non_null();
inline oop class_loader() const;
// Returns true if this class loader data is for a loader going away.
+ // Note that this is only safe after the GC has computed if the CLD is
+ // unloaded or not. In concurrent contexts where there are no such
+ // guarantees, is_alive() should be used instead.
bool is_unloading() const {
assert(!(is_the_null_class_loader_data() && _unloading), "The null class loader can never be unloaded");
return _unloading;
}
< prev index next >