Is there any strong reason to not accept Value at update() ?
For example, MichaelKVList::insert() is declared as
template <typename K, typename V>
bool insert( K&& key, V&& val )
while there is no update() with V argument.
Yes, we could pass functor that will assing new value to the newly inserted item but there is time window between item insertion and functor execution when another thread could find just inserted item with empty second and all it can do is to spin until second will be initialized.
Why not pass V into update() ?
Am I missing something ?
Is there any strong reason to not accept Value at update() ?
For example, MichaelKVList::insert() is declared as
while there is no update() with V argument.
Yes, we could pass functor that will assing new value to the newly inserted item but there is time window between item insertion and functor execution when another thread could find just inserted item with empty
secondand all it can do is to spin untilsecondwill be initialized.Why not pass V into update() ?
Am I missing something ?