[ CCode ( ordering = 5 ) ]
public virtual Future<B> zip<A,B> (owned ZipFunc<G,A,B> zip_func, Future<A> second)
Combines values of two futures using a function returning the combined value in future (call does not block).
As time taken by function does not contribute to wait_until and the implementation is allowed to compute value eagerly by wait_async it is recommended to return a future from task and use flat_map for longer computation.
zip_func |
Function applied to values |
second |
Second parameter |
A combine value |
0.11.4