Resolve potential deadlock state during EsThreadPoolExecutor shutdown
Fixes #4334 The deadlock occurs between monitor object of EsThreadPoolExecutor and mainLock of ThreadPoolExecutor. The shutdown method of EsThreadPoolExecutor obtains the lock on monitor first and waits for mainLock of ThreadPoolExecutor in ThreadPoolExecutor#shutdown for part of the processing, while EsThreadPoolExecutor#terminated is executed under mainLock and tries to obtain monitor to notify listeners.
This commit is contained in:
parent
8f85d63b67
commit
d8ba92cfa8
|
@ -53,8 +53,8 @@ public class EsThreadPoolExecutor extends ThreadPoolExecutor {
|
|||
} else {
|
||||
this.listener = listener;
|
||||
}
|
||||
shutdown();
|
||||
}
|
||||
shutdown();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue