concurrentMemoize

fun <T, R> (T) -> R.concurrentMemoize(): (T) -> R

Creates a thread-safe memoized version of the receiver function.

Return

A function that safely caches results across multiple threads.

Parameters

T

The input type for the function.

R

The output type of the function.