+/EE360P
distributed systems
git clone https://git.julia.blue/+/EE360P
df69975
master
1public class CountingSemaphore { 2int value ; 3public CountingSemaphore (int initValue ) { 4value =initValue ; 5 } 6public synchronized void P () { 7while (value ==0 )Util .myWait (this ); 8value --; 9 10 } 11public synchronized void V () { 12value ++; 13notify (); 14 } 15}