Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. private static ExecutorService getCachedPool(ThreadFactory threadFactory)
  2. {
  3. return new ThreadPoolExecutor(20, 20,
  4. 60L, TimeUnit.SECONDS,
  5. new SynchronousQueue<Runnable>(),
  6. threadFactory);
  7. }
  8.  
  9. List<Future<ArtistCoverImage>> results = ArtistArtworkOnlineLookup.getExecutorService()
  10. .invokeAll(lookups);
  11.  
  12. private static ExecutorService getCachedPool(ThreadFactory threadFactory)
  13. {
  14. return new ThreadPoolExecutor(20, Integer.MAX,
  15. 60L, TimeUnit.SECONDS,
  16. new SynchronousQueue<Runnable>(),
  17. threadFactory);
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement