top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What differences are between submit and execute method with ThreadPoolExecutor?

+2 votes
140 views
What differences are between submit and execute method with ThreadPoolExecutor?
posted Dec 11, 2014 by Joy Nelson

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes

The difference between submit and execute method with ThreadPoolExecutor are:

When our tasks throw an exception and if it was submitted with execute this exception will go to the uncaught exception handler. If you submitted the task with submit any thrown exception, checked or not, is then part of the task return status.

answer Dec 12, 2014 by Karthick.c
...