![JAR search and dependency download from the Maven repository](/logo.png)
com.jillesvangurp.iterables.ConcurrentProcessingIterable Maven / Gradle / Ivy
package com.jillesvangurp.iterables;
import java.io.Closeable;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Iterable that processes the input concurrently using a {@link Processor} to produce its output.
*
* Please note that this class implements {@link Closeable} and that you are supposed to use a try with resources call.
* The reason for this is to guarantee the executor used for delegating the work is shut down correctly.
*
* @param
* type of the input processed by this iterable
* @param
© 2015 - 2025 Weber Informatics LLC | Privacy Policy