~6% of callers of our old Futures.combine either pass a Callable<Void>, ignore the result of combine, or both. Some of these might need to use Callable because they throw checked exceptions, but others would probably prefer not to write the extra boilerplate (mostly return null but also <Void>).
We could help them out by providing run(Runnable) alongside call(Callable). We could still return ListenableFuture<?> for users who need to check for errors or await the result.
6% is a small percentage, but the API is also very low cost (easy to understand and "hidden" in the FutureCombiner type). It would also match the overloads of ExecutorService.submit.
Hi,
I've made certain code changes regarding that issue and was wondering if it's still being evaluated by the guava team.
We may well add it someday. It's just a matter of our finding the time to run it through our internal API-review process.
I'm not quite familiar with the process yet, but perhaps I can contribute the changes to the project?
Unfortunately it's an internal-only process. But this addition should be straightforward enough, so I'll try to take care of it when I have a spare moment.
(This would also let people write expression lambdas instead of block lambdas in some cases.)
Most helpful comment
(This would also let people write expression lambdas instead of block lambdas in some cases.)