Executor framework threads के pools को प्रबंधित करता है ताकि आप manually threads बनाने के बजाय tasks submit करें, और CompletableFuture asynchronous operations को declaratively compose करता है। साथ में ये Java में concurrent/async काम करने का आधुनिक तरीका हैं — raw thread प्रबंधन की लागत और जटिलता से बचते हुए।
raw threads की समस्या
(Task t : tasks) {
(() -> process(t)).start();
}
