Having this List<Future<Object>> list, I have to send it to my own pool instead of using the default parallel thread processing.
This is because the api stream uses a common pool for parallel processing, and you call get on these futures (if it takes a lot of time to process) - you will block all other operations of the stream that use parallel operations in your application until it done.
It will be something like this:
forJoinPool.submit( () -> list.stream().parallel().map(future -> future.get()).collect(Collectors.toList())).get();
I would go with a custom pool as shown here
source share