Add synchronized on lockLeakCheck() because threadCountMap is not thread safe. (#6029)
Co-authored-by: lgh <liuguanghua@kanzhun.com>
This commit is contained in:
parent
e3c135b0b3
commit
335587df9e
@ -256,7 +256,7 @@ private synchronized void putThreadName(String thread) {
|
|||||||
threadCountMap.putIfAbsent(thread, new TrackLog(thread));
|
threadCountMap.putIfAbsent(thread, new TrackLog(thread));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void lockLeakCheck() {
|
public synchronized void lockLeakCheck() {
|
||||||
if (!openLockTrace) {
|
if (!openLockTrace) {
|
||||||
LOG.warn("not open lock leak check func");
|
LOG.warn("not open lock leak check func");
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user