private[this] def loop()

in src/main/scala/com/twitter/stitch/Pending.scala [98:111]


  private[this] def loop(): Unit = {
    if (nwaiters.getAndIncrement() == 0) {
      do {
        val interrupt = interrupts.poll()
        if (interrupt ne null) {
          raiseOnPendingFutures(interrupt)
        }

        pruneSatisfiedFutures()
        simplifyAndPruneRoots()
        runNewBatches()
      } while (nwaiters.decrementAndGet() > 0)
    }
  }