+/EE360P
distributed systems
git clone https://git.julia.blue/+/EE360P
df69975
master
1class BCell {// can result in deadlocks 2int value ; 3public synchronized int getValue () { 4return value ; 5 } 6public synchronized void setValue (int i ) { 7value =i ; 8 } 9public synchronized void swap (BCell x ) { 10int temp =getValue (); 11setValue (x .getValue ()); 12x .setValue (temp ); 13 } 14}