Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support CompletableFuture<T> #76

Open
d-gs opened this issue Dec 9, 2019 · 1 comment
Open

Support CompletableFuture<T> #76

d-gs opened this issue Dec 9, 2019 · 1 comment

Comments

@d-gs
Copy link

d-gs commented Dec 9, 2019

I would like to use CompletableFuture<ProcessResult> compose functionality instead of a pure Future to be able to chain process as in a pipeline waiting one for the next. Looking a into your code (not soo deeply) I found that this might be simple by modifying the following method to use CompletableFuture#supplyAsync(Supplier, Executor) instead of ExecutorService#submit(Callable<T>):

protected <T> Future<T> invokeSubmit(ExecutorService executor, Callable<T> task) {

Changing the signature of the methods and variables for CompletableFuture should not have any impact in clients of the API (but maybe on custom implementations). Another putative side-effect is that the shutdown of the ExecutorService might fail if chaining in an asynchronous way the produced CompletableFuture.

Could it be possible to implement such a solution? Thanks!

@nemecec
Copy link
Collaborator

nemecec commented Feb 22, 2023

Would you be willing to send a pull request?
(Sorry for the long delay, I'm taking over maintenance of this project so communication should be faster from now on)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants