void absorbPendingPool()

in ComponentKit/StatefulViews/CKStatefulViewReusePool.mm [70:84]


  void absorbPendingPool(const FBStatefulReusePoolItem &otherPool, NSInteger maxEntries) noexcept
  {
    for (const FBStatefulReusePoolItemEntry &entry : otherPool._entries) {
      // In the future, we should consider not evaluating the block here immediately, and letting it move into the
      // normal reuse pool. That way we can let stateful components hold onto their own views without any
      // reconfiguration for a longer period of time.
      if (entry.block == NULL || entry.block()) {
        // The stateful view component can decide not to allow reuse of its view if the component has re-mounted before
        // the block is evaluated.
        if (maxEntries < 0 || viewCount() < maxEntries) {
          _entries.push_back({entry.view});
        }
      }
    }
  }