Main.java 307 B

123456789101112131415161718
  1. class Main {
  2. public static void main(String args[]){
  3. System.out.println("Start thread lab");
  4. // Create different mutex
  5. Mutex mutD = new MutexTypeD();
  6. Task t0 = new Task("T0", 0, mutD);
  7. Task t1 = new Task("T1", 1, mutD);
  8. t0.describe();
  9. t1.describe();
  10. t0.start();
  11. t1.start();
  12. }
  13. }