TIJ4-code
TIJ4-code copied to clipboard
"concurrency/ExplicitCriticalSection.java" not accurate
ExplicitPairManager1 method could't use synchronized keywords
Yes,they are ill codes.
ExplicitPairManager2. increment() and PairChecker.run() have data race. ExplicitPairManager2.lock and PairManager.getPair() are not the same lock, The synchronized lock used by PairManager.getPair () is the ExplicitPairManager2 object lock.