globallyMemoized

Given a function fun which returns a promise, globally memoize it (across all threads), so that at most one invocation of fun with the given parameters is invoked during the program's lifetime. If a fun promise is in progress (incl. if started by another thread), wait for it to finish first.

template globallyMemoized(alias fun)
static if(is(FunctionTypeOf!fun PT == __parameters))
globallyMemoized
(
PT args
)
if (
is(ReturnType!fun == Promise!(T, E),
T
E
)
)

Members

Aliases

P
alias P = ReturnType!fun
Undocumented in source.

Functions

globallyMemoized
P globallyMemoized(PT args)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta