refactored mutexes to use java ReentrantLock

This commit is contained in:
Aidan Hahn 2019-06-01 14:59:16 -07:00
parent 5871e1b152
commit 18a7fcc0b3
No known key found for this signature in database
GPG key ID: 327711E983899316
3 changed files with 63 additions and 72 deletions

View file

@ -27,18 +27,10 @@ class ProcessManagerTestImplementation extends ProcessManager {
super.releaseLock(pid);
} catch (TimeoutException e) {
System.err.println("[!!] Long Call wasnt able to grab lock!");
return;
} catch (InterruptedException e) {
super.releaseLock(pid); // this doesnt happen, dont cancel this task
System.err.println("[3] Released lock: interrupted");
return;
}
}
public Boolean reportLockState(int pid) {
return super.lockMap.get(pid);
}
}