code: public int getNumberWaiting() {
          final ReentrantLock lock = this.lock;
          lock.lock();
          try {
              return parties - count;
          } finally {
              lock.unlock();
          }
      }
docs: Returns the number of parties currently waiting at the barrier.
  This method is primarily useful for debugging and assertions.
  
  @return the number of parties currently blocked in {@link #await}