@Override
  public synchronized void close() throws IOException {
    outstandingTasks.clear();
    cache.clear();
    wrappedCollection.close();
    closed = true;
  }
@return True if all tasks have been removed and processed.
services/tasks/src/main/java/org/hyperledger/besu/services/tasks/CachingTaskCollection.java