zip


Description:

[ 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).

Note:

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.

Parameters:

zip_func

Function applied to values

second

Second parameter

Returns:

A combine value

Since:

0.11.4