Method atomic_get_set()
- Method
atomic_get_set
mixedatomic_get_set(mapping|objectmap,mixedkey,mixedval)
mixedatomic_get_set(arrayarr,intindex,mixedval)- Description
Replace atomically the value for a key in a mapping or array.
- Parameter
map - Parameter
arr Mapping or array to alter.
- Parameter
key - Parameter
index Key or index to change the value for.
- Parameter
val Value to change to. If value is UNDEFINED and
mapis a mapping this function function behaves exactly asm_delete(map, key).- Returns
Returns the previous value for
key. Ifmapis a mapping and there was no previous value UNDEFINED is returned.If
mapis an objectlfun::_m_replace()will be called in it.- See also