public <T>T guard(final Callable<T> r) throws Exception {
  incThread();
  try {
    return r.call();
  }
  finally {
    decThread();
  }
}

public < T > T guard ( final Callable < T > r ) throws Exception { incThread ( ) ; try { return r . call ( ) ; } finally { decThread ( ) ; } }
execute a critical region which needs to be interrupted if some condition is violated .
