mirror of https://github.com/apache/activemq.git
Default to caller runs policy on task rejection.
This commit is contained in:
parent
05f918ceb8
commit
9a866cf567
|
@ -187,11 +187,13 @@ public class TaskRunnerFactory implements Executor {
|
|||
return thread;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if (rejectedTaskHandler != null) {
|
||||
rc.setRejectedExecutionHandler(rejectedTaskHandler);
|
||||
} else {
|
||||
rc.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
||||
}
|
||||
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ public final class SelectorManager {
|
|||
t.setDaemon(true);
|
||||
return t;
|
||||
}
|
||||
});
|
||||
}, new ThreadPoolExecutor.CallerRunsPolicy());
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue