Skip to main content

Promise

Promise.join

def Promise.join(*args) -> Promise

Join a set of promises together into a single promise.

Given a series of promises, p4 = p1.join(p2, p3) will produce a promise where the value is promise that resolves to a tuple containing the three values, those from p1, p2 and p3 respectively.


Promise.map

def Promise.map(
func: typing.Callable[[typing.Any], typing.Any],
/,
) -> Promise

Given a promise, apply a function to the value it contains, producing a promise with the resulting value.