<div dir="ltr">Hello,<br><br><div class="gmail_quote"><div dir="ltr">On Mon, Nov 19, 2018 at 7:44 PM Vans S <<a href="mailto:vans_163@yahoo.com">vans_163@yahoo.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Currently there is no atomic function to update a ETS value when its not a tuple.  For example if one of my ETS values is a map, and I want to put an element into the map, I have no atomic way to do so.<br><br>Is there anyone else that really has a need for a function like :ets.update/3 where arg 1 is ets_table, 2 is key, 3 is fun callback that is called passing the original element and the reply should be the new element?</div></div></blockquote><div><br></div><div>I've long wanted to do this for match specs, it would however be a huge undertaking to implement this. The main problem is what to do if the process runs out of reductions while doing the update.</div><div><br></div><div>Should it be allowed to continue to run? and thus potentially starve other processes.</div><div>Should it be preempted? what do we then do with the locks on the ETS table?</div><div><br></div><div>Lukas</div></div></div>