in src/main/scala/com/twitter/stitch/Pending.scala [115:130]
private[this] def pruneSatisfiedFutures(): Unit = {
var i = 0
var j = 0
while (i < futures.length) {
futures(i) match {
case f if !f.isDefined =>
futures(j) = f
j += 1
case _ =>
}
i += 1
}
futures.reduceToSize(j)
}