You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>):
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!
The text was updated successfully, but these errors were encountered:
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)
I would like to use
CompletableFuture<ProcessResult>
compose functionality instead of a pureFuture
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 useCompletableFuture#supplyAsync(Supplier, Executor)
instead ofExecutorService#submit(Callable<T>)
:zt-exec/src/main/java/org/zeroturnaround/exec/ProcessExecutor.java
Line 1147 in 08dda48
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 theExecutorService
might fail if chaining in an asynchronous way the producedCompletableFuture
.Could it be possible to implement such a solution? Thanks!
The text was updated successfully, but these errors were encountered: