fixed a bug in PrioritizedThreadPoolExecutor:
now execute(Runnable) verifies the command is added as Comparable
This commit is contained in:
parent
678a8664f6
commit
eef3610e12
|
@ -49,7 +49,7 @@ public class PrioritizedEsThreadPoolExecutor extends EsThreadPoolExecutor {
|
|||
|
||||
@Override
|
||||
public void execute(Runnable command) {
|
||||
if (!(command instanceof PrioritizedRunnable)) {
|
||||
if (!(command instanceof Comparable)) {
|
||||
command = PrioritizedRunnable.wrap(command, Priority.NORMAL);
|
||||
}
|
||||
super.execute(command);
|
||||
|
|
Loading…
Reference in New Issue