I have given list in java
List<String> list;
And I have a function which takes String and gives CompletionStage. I want to iterate through list and process each task sequentially, That is when one task gives result then only i want to schedule next task from list. Is there a way to do this asynchronously without calling .get()
I also want ability to stop somewhere midway on this, depending upon the result of previous task.