The MonitorDeflationThread's only job is to deflate monitors, and monitor deflation is now only ever performed by that thread. But the code on both sides is public and then we check that the right thread is doing the deflation. If the MonitorDeflationThread logic was directly part of ObjectSynchronizer, the code could be private, there would be no question as to which thread is doing the work and we would not have to query/check that. The Thread::is_monitor_deflation_thread() query could also then be removed.
See some earlier discussion in https://github.com/openjdk/jdk/pull/16706/files#r1399804745
See some earlier discussion in https://github.com/openjdk/jdk/pull/16706/files#r1399804745
- relates to
-
JDK-8320304 Refactor and simplify monitor deflation functions
-
- Resolved
-
- links to
-
Review(master) openjdk/jdk/22998