code: public void suspend() {
      if (suspension.compareAndSet(null, new CountDownLatch(1))) {
        try {
          suspendBarrier.await();
        } catch (InterruptedException e) {
          Thread.currentThread().interrupt();
        } catch (BrokenBarrierException e) {
          LOG.error("Exception during suspend: " + flowletContext, e);
        }
      }
    }
docs: Suspend the running of flowlet. This method will block until the flowlet running thread actually suspended.