log("1st read: value is " + value);
assertEquals(10, value);
sem.release(); // give t2 time to make the modification
TestingUtil.sleepThread(100);
sem.acquire(); // to read the uncommitted modification by t2
log("2nd read: value is " + value + "; we should see t2's uncommitted change (20)");
assertEquals(20, value); // we're seeing the modification by t2 before t2 committed (a.k.a. released the lock)
sem.release();
TestingUtil.sleepThread(100);