У меня создается пул подобным образом:
pool = new ThreadPoolExecutor(1, 1, 1, TimeUnit.MINUTES, new ArrayBlockingQueue
Ответ
Из документации: If the task cannot be submitted for execution, either because this executor has been shutdown or because its capacity has been reached, the task is handled by the current RejectedExecutionHandler. DiscardPolicy - и есть RejectionExecutionHandler, который, цитируя: Does nothing, which has the effect of discarding task r т.е молча выкинет данный таск.
Комментариев нет:
Отправить комментарий