Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List<String> A = aService.getListA();
- List<Integer> B = bService.getListB();
- ExecutorService es = Executors.newFixedThreadPool(2);
- Future<List<String>> getAs = es.submit(() -> aService.getListA());
- Future<List<Int>> getBs = es.submit(() -> bService.getListB());
- es.shutdown();
Add Comment
Please, Sign In to add comment