@Override
    public boolean test(final Pair<Bytes32, Bytes> pair) {
      final boolean result = delegate.test(pair);
      return shouldContinue.getAndSet(result);
    }
Predicate that doesn't immediately stop when the delegate predicate returns false, but instead
sets a flag to stop after the current element is processed.
ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/snap/SnapServer.java