Class CountingCompletionService<V>

java.lang.Object
java.util.concurrent.ExecutorCompletionService<V>
com.saxonica.ee.parallel.CountingCompletionService<V>
All Implemented Interfaces:
CompletionService<V>

public class CountingCompletionService<V> extends ExecutorCompletionService<V>
Extension of ExecutorCompletionService to count the number of tasks submitted and take that many completed tasks before calling it a day.

This is necessary because the base class, ExecutorCompletionService, does not provide any way of knowing how many results you need to read off before you know that you have read them all.