public class Application {
    public static void main(String[] args) {
        /*Producer p1 = new Producer("elso");
        Producer p2 = new Producer("masodik");
        try {
            p1.start();
            Thread.sleep(500);
            p2.start();
        } catch (InterruptedException e){
            System.out.println("Hiba történt!");
        }*/

        Fifo genesis = new Fifo();
        Producer p1 = new Producer("termelo1",genesis,1000);
        Producer p2 = new Producer("termelo2",genesis,1000);
        Producer p3 = new Producer("termelo3",genesis,1000);
        Consumer c1 = new Consumer(genesis,"evo1",100);
        Consumer c2 = new Consumer(genesis,"evo2",100);
        Consumer c3 = new Consumer(genesis,"evo3",100);
        Consumer c4 = new Consumer(genesis,"evo4",100);
        p1.run();
        p2.run();
        p3.run();
        c1.start();
        c2.start();
        c3.start();
        c4.start();
        //Nem feltétlenül hiba, de itt éhezés van, csak a 2. és 3. Consumer eszik.
    }
}