Number of tasks (threads) submitted is also not huge in this test scenario.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’ll need to provide code samples of how you instantiate and call
submiton the pool (IP should be a non-issue here as we don’t need details of the internals of yourCallableclasses or anything like that).Based on the information that you’ve given, you’re almost certainly shutting down the executor service somewhere before submitting the callable to it. Check if you make any calls to
shutdownorshutdownNow, and if so ensure that you’re not adding tasks after this point.Beyond that, you may want to register your own implementation of
java.util.concurrent.RejectedExecutionHandlerin order to aid in debugging; its rejectedExecution message will be called whenever the executor is unable to accept a task, so you could put some rudimentary state-inspection logic there to help you find the cause.