vlingo / xoom-common

The VLINGO XOOM platform SDK common tools shared across various projects.
Other
16 stars 10 forks source link

Completes.recoverFrom() should support a handler that returns a Completes<Y> not just Y #13

Open bwehrle opened 5 years ago

bwehrle commented 5 years ago

Scenario:

Imagine that the function inside the recovery handler returns a Completes

From inside the recoverFrom(), I would not want to do a await() on the inner Completes, I'd rather return the Completes directly, since that is what the outer code block is expecting as a result. Otherwise I need to do some kind of await() call just to return a Y which will just be turned into a Completes with the outcome already provided, making the thread block.