Lab 4 · Executor Framework

Difficulty: Intermediate Time: 45 minutes Topics: ExecutorService, thread pools, Future, shutdown


Objectives

  • ✅ Create and use fixed thread pool
  • ✅ Submit Runnable and Callable tasks
  • ✅ Retrieve results with Future
  • ✅ Gracefully shutdown executor

Key Exercises

Exercise 1: Create fixed thread pool and submit tasks Exercise 2: Submit Callables and aggregate results Exercise 3: Handle task exceptions with Future Exercise 4: Implement graceful shutdown pattern


References