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:
Igor Motov 2013-12-13 18:56:32 -05:00
parent 8f85d63b67
commit d8ba92cfa8
1 changed files with 1 additions and 1 deletions

View File

@ -53,8 +53,8 @@ public class EsThreadPoolExecutor extends ThreadPoolExecutor {
} else { } else {
this.listener = listener; this.listener = listener;
} }
shutdown();
} }
shutdown();
} }
@Override @Override