Documentation Prolog Predicate Reference concurrent future_any/2

future_any/2

Make a Future that resolves as soon as any of the futures in a list succeeds.

Description

future_any( +list_of_futures, -future )

future_any(ListOfFutures, FutureAny) takes a list of futures and returns a single future FutureAny that resolves as soon as any of the futures in ListOfFutures fulfills. If any future in ListOfFutures resolves to exception before another future succeeds, FutureAny also resolves to exception. If all futures in ListOfFutures resolves to failure, FutureAny also resolves to failure.

Implementation