Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import colacircular.*;
- import clientescolacircular.*;
- /**
- * 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
- *
- * @author adolfo
- *
- */
- public class Main {
- private static int NHILOS = 2;
- public static void main (String[] args){
- // TODO Auto-generated method stub
- ColaCircular colacompartida = new ColaCircular(15);
- for (int i = 0; i < NHILOS; i++) {
- new HilosQueEncolan(colacompartida).start();
- new Thread(new HilosQueDesencolan(colacompartida)).start();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement