+/EE360P

distributed systems

git clone https://git.julia.blue/+/EE360P

Wei-Lun Hungadd chap. 2 and 3df69975

master
197 B9 linesraw
1public class TestAndSet {
2    int myValue = -1;
3    public synchronized int testAndSet(int newValue) {
4        int oldValue = myValue;
5        myValue = newValue;
6        return oldValue;
7    }
8}
9