Is there a way to get the results of a PromiseList if it expires

I have a PromiseList in Grails that has a list of promises. If I ask for a value with a timeout value, can I get non-urgent futures results if the timeout stopped the promise list?

+3


source to share


1 answer


Unfortunately, the short answer is "No, there is no way to get partial results when some of the promises on your promise list succeed, and one or more fail." This is because the list of promises counts as success or failure as a whole. Any exception including timeout will be thrown onError

instead of onComplete

.



The only alternative, if you want separate results that do not depend on other promises, is to use separate promises instead of a list.

+1


source







All Articles