Advertisement
Guest User

Untitled

a guest
Nov 12th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. import colacircular.*;
  2. import clientescolacircular.*;
  3. /**
  4. * Crea la cola circular, y al menos 2 hilos de tipo HilosQueEncolan y al menos 2 hilos de tipo HilosQueDesencolan y los pone a ejecutar
  5. *
  6. * @author adolfo
  7. *
  8. */
  9. public class Main {
  10.  
  11. private static int NHILOS = 2;
  12.  
  13. public static void main (String[] args){
  14. // TODO Auto-generated method stub
  15.  
  16. ColaCircular colacompartida = new ColaCircular(15);
  17.  
  18. for (int i = 0; i < NHILOS; i++) {
  19. new HilosQueEncolan(colacompartida).start();
  20. new Thread(new HilosQueDesencolan(colacompartida)).start();
  21. }
  22.  
  23.  
  24.  
  25. }
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement