mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
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…
x
Reference in New Issue
Block a user