Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package mp3_2;
- import domain.Consumer;
- import domain.Producer;
- /**
- *
- * @author crownedzero
- */
- public class Mp3_2 {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- ThreadGroup producerGroup = new ThreadGroup("Producers");
- Thread t0 = new Thread(producerGroup, new Producer(), "EastCoastOriginals");
- Thread t1 = new Thread(producerGroup, new Producer(), "WestCoastCustoms");
- t0.start();
- t1.start();
- ThreadGroup consumerGroup = new ThreadGroup("Producers");
- Thread t2 = new Thread(consumerGroup, new Consumer(), "Eastern");
- Thread t3 = new Thread(consumerGroup, new Consumer(), "Central");
- Thread t4 = new Thread(consumerGroup, new Consumer(), "Mountain");
- Thread t5 = new Thread(consumerGroup, new Consumer(), "Pacific");
- t2.start();
- //t3.start();
- //t4.start();
- //t5.start();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement