invokeAll () no está dispuesto a aceptar una Colección <invocable <T>>
No entiendo por qué este código no se compilará
ExecutorService executor = new ScheduledThreadPoolExecutor(threads);
class DocFeeder implements Callable<Boolean> {....}
...
List<DocFeeder> list = new LinkedList<DocFeeder>();
list.add(new DocFeeder(1));
...
executor.invokeAll(list);
El mensaje de error es:
The method invokeAll(Collection<Callable<T>>) in the type ExecutorService is
not applicable for the arguments (List<DocFeeder>)
list
es unCollection
deDocFeeder
, que implementaCallable<Boolean>
- ¡¿Que esta pasando?!