Archive Post
Home
Defining Tasks That Return a Result – Concurrency: Part II
Defining Tasks That Return a Result Implementations of the java.util.concurrent.Callable<V> functional interface represent tasks that…
Representing Task Results – Concurrency: Part II
Representing Task Results A Future<V> object represents the result of a task that is asynchronously…
Submitting Tasks and Handling Task Results – Concurrency: Part II
Submitting Tasks and Handling Task Results Tasks executed by executor services are represented by implementations…
Submitting Tasks Individually – Concurrency: Part II
Submitting Tasks Individually Example 23.2 illustrates submitting tasks individually and handling the task result. A…
Invoking Tasks Collectively – Concurrency: Part II
Invoking Tasks Collectively Example 23.2 also illustrates invoking tasks collectively and handling the task results.…
Scheduling One-Shot Tasks – Concurrency: Part II
Scheduling One-Shot Tasks The overloaded schedule() method of the ScheduledExecutorService interface allows either a Runnable…
Scheduling Periodic Tasks – Concurrency: Part II
Scheduling Periodic Tasks The ScheduledExecutorService interface provides two methods that can be used to schedule…
Task Cancellation – Concurrency: Part II
Task Cancellation Task cancellation is an important aspect of controlling task execution. Here we look…
Task Cancellation 2 – Concurrency: Part II
The scheduledTaskCancellation() method at (13) illustrates how to cancel a submitted task by scheduling a…
The Fork/Join Framework 2 – Concurrency: Part II
Table 23.3 Task-Defining Classes Classes in the java.util.concurrent package to define tasksDescriptionForkJoinTask<V>Abstract class that defines…