ConcurrentDictionaryExtensions Type
Static members
| Static member |
Description
|
Full Usage:
ConcurrentDictionaryExtensions.GetOrAddLazy(dic, key, factory)
Parameters:
ConcurrentDictionary<'key, Lazy<'value>>
key : 'key
factory : 'key -> 'value
Returns: 'value
Type parameters: 'key, 'value |
GetOrAdd whose value is produced by 'factory' at most once per key and then cached. The value is held behind a Lazy, so under contention every caller observes the same instance and 'factory' runs once per key.
|
fantomas