I'm considering switching from synchronized
to a ReadWriteLock
. Before doing it, I would like to check if it's worth it.
ThreadMXBean
and ThreadInfo
provide information about overall thread blocked count and time. Those blocks can be caused by multiple monitors. Is there a way to measure block statistics given a particular monitor object?