Main.java 384 B

1234567891011121314151617181920212223
  1. class Main {
  2. static Mutex sharedMutex;
  3. public static void main(String args[]){
  4. System.out.println("Start thread lab");
  5. sharedMutex = new MutexTypeD();
  6. runExperiment();
  7. }
  8. private static void runExperiment() {
  9. Task t0 = new Task("T0", 0, sharedMutex);
  10. Task t1 = new Task("T1", 1, sharedMutex);
  11. t0.describe();
  12. t1.describe();
  13. t0.start();
  14. t1.start();
  15. }
  16. }