doFuture


Description:

public Future<T> doFuture<T> (string key, owned SingleFlightFunc<T> fn)

Asynchronous version of do().

Returns a failed future when do returns Result.error (for example INVALID_ARGUMENT, TYPE_MISMATCH, INTERNAL_STATE). The failure string includes error message, domain, and code.

Parameters:

key

deduplication key.

fn

function to run.

Returns:

future of shared result.