Relates :
|
As a followup to JDK-8180175: ObjectSynchronizer only needs to iterate in-use monitors, David Holmes noted: "When a thread terminates, omFlush is used to transfer the thread's inUseList to the global inUseList. This happens after the thread has been removed from the _threads_list and can run concurrently with a safepoint. This means that there is a window of time where the monitors in the thread's inUseList will not be seen by the safepoint oops_do processing: - the thread oops_do won't be called because the thread is not in the thread's list - the monitors are not yet in the global in-use-list "