Advertisement
Guest User

Untitled

a guest
Aug 26th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. public void ServiceMethod()
  2. {
  3. ExecutorService executorService = Executors.newFixedThreadPool(10);
  4. executorService.execute(new Runnable() {
  5. public void run() {
  6. System.out.println("Asynchronous task");
  7. }
  8. });
  9. executorService.shutdown();
  10. }
  11.  
  12. ExecutorService executorService = Executors.newFixedThreadPool(10);
  13.  
  14. static ExecutorService executorService = Executors.newFixedThreadPool(10);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement