1.

What Is Executorservice In Java Concurrency?

Answer»

ExecutorService interface EXTENDS Executor interface and provides methods to manage termination and methods that can produce a Future for tracking PROGRESS of one or more asynchronous tasks.

ExecutorService has more versatile submit method. Like execute, submit accepts Runnable objects, but also accepts Callable objects, which allow the task to return a VALUE. The submit method returns a Future OBJECT, which is used to RETRIEVE the Callable return value and to manage the status of both Callable and Runnable tasks.

ExecutorService interface extends Executor interface and provides methods to manage termination and methods that can produce a Future for tracking progress of one or more asynchronous tasks.

ExecutorService has more versatile submit method. Like execute, submit accepts Runnable objects, but also accepts Callable objects, which allow the task to return a value. The submit method returns a Future object, which is used to retrieve the Callable return value and to manage the status of both Callable and Runnable tasks.



Discussion

No Comment Found