DiffusionTM Publisher API 6.3.2
public interface ThreadPoolRejectionHandler
ThreadPool will be unable to execute a task if all its threads are
in use and its queue is full.
The default ThreadPoolRejectionHandler is
ThreadService.CallerRunsRejectionPolicy, which will execute the task
in the thread that passed it to the pool. We also provide an alternative
ThreadService.AbortRejectionPolicy, which throws an exception.
void rejectedExecution(RunnableTask runnable, ThreadPool threadPool) throws APIException
runnable- the task.
threadPool- the thread pool.
APIException- if unable to handle the execution. This would be regarded as a serious error.
Copyright © 2019 Push Technology Ltd. All Rights Reserved.