+/EE360P
distributed systems
git clone https://git.julia.blue/+/EE360P
df69975
master
1public class BinarySemaphore { 2boolean value ; 3public BinarySemaphore (boolean initValue ) { 4value =initValue ; 5 } 6public synchronized void P () { 7while (value ==false ) 8Util .myWait (this );// in the queue of blocked processes 9value =false ; 10 } 11public synchronized void V () { 12value =true ; 13notify (); 14 } 15}