IMapK, VPutAsync Method (K, V)Hazelcast .Net Client Class Library
Asynchronously puts the given key and value.

Namespace: Hazelcast.Core
Assembly: HazelcastClient3x (in HazelcastClient3x.dll) Version: 3.3.0.9
Syntax

Task<V> PutAsync(
	K key,
	V value
)

Parameters

key
Type: K
the key of the map entry
value
Type: V
the new value of the map entry

Return Value

Type: TaskV
Task<V> from which the old value of the key can be retrieved.
Remarks

Asynchronously puts the given key and value.
Task<V> task = map.PutAsync(key, value);
// do some other stuff, when ready get the result
V oldValue = task.Result;
Task.Result will block until the actual map.Put() completes. If the application requires timely response, then task.Wait(timeout) can be used.
try
{
    Task<V> task = map.PutAsync(key, value);
    if(task.Wait(TimeSpan.FromMilliseconds(40)))
    {
       V value = task.Result; 
    }
    else
    {
     //Result not ready
    }
ExecutionException is never thrown.

Warning:

This method uses GetHashCode and Equals of binary form of the key, not the actual implementations of GetHashCode and Equals defined in key's class.
See Also

Reference