views:

44

answers:

0

Are there any circumstances under which a ThreadPoolExecutor.CallerRunsPolicy will throw a RejectedExecutionException?

It seems to me that the policy itself is intended to prevent throwing these Exceptions. The API for its interface method, RejectedExecutionHandler.rejectedExecution() claims that it may throw a RejectedExecutionException. The API for CallerRunsPolicy.rejectedExecution() does not.

Summary: Do I need to explicitly handle a RejectedExecutionException on execute() if I'm using a CallerRunsPolicy?