Пример #1
0
 @Override
 public void run() {
   sem2.acquire();
   this.failed = scanStack();
   sem1.release();
 }
Пример #2
0
 private void bar(A a) {
   sem2.release();
   sem1.acquire();
 }