ThreadPoolExecutor executor = new ThreadPoolExecutor(8,10,10L, TimeUnit.SECONDS,
new LinkedBlockingQueue<>(8));
CountDownLatch latch = new CountDownLatch(userList.size());
for (UserBean user : userList){
executor.execute(() -> {
String field= productServiceImpl.getTopListFields(user);
resultList.add(field);
latch.countDown();
});
}
latch.await()