ExecutorService.invokeAll signatures

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

ExecutorService.invokeAll signatures

Doug Lea
Someone posted a bug report 6267833:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6267833

It says that the current ExecutorService.invokeAll signature:
    <T> List<Future<T>> invokeAll(Collection<Callable<T>> tasks)
should be:
    <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks)

The poster is right. The proposed signature is a much better choice.
However, there is a small compatibility issue. While the change
would be binary compatible with existing usages, doing this
would cause existing ExecutorService implementations/subclasses written
by usrs to encounter compilation errors until they also change the
signature.

This is a hard decision -- a small benefit to the many users of
ExecutorServices vs a small risk that anyone has ever written
a class that overrides this method and couldn't trivially adapt it.

So we'd like to know if anyone on this list has done this.
If you've ever written a custom ExecutorService that
overrrides the version of invokeAll in AbstractExecutorService,
and couldn't easily adapt, could you let me know?

Thanks!

-Doug

_______________________________________________
Concurrency-interest mailing list
[hidden email]
http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest