@Override
 public void run() {
   sem2.acquire();
   this.failed = scanStack();
   sem1.release();
 }
 private void bar(A a) {
   sem2.release();
   sem1.acquire();
 }