[erlang-questions] Cross OTP version compare-and-swap semantic on ETS
Thu Oct 12 10:01:57 CEST 2017
I’m looking on the best way (in term of concurrency and response speed) to provide a equivalent of compare-and-swap semantic on differs Erlang version with ETS.
For now what I do is using `select_replace/2` on OTP 20 and for other versions I’m using a pen_server to serialise the writes on this values, making this gen_server a bottle neck. Which is fine for a small list of keys to update. I didn’t find any other solution to do it right now. But maybe someone has an idea?
Also something I’m currently missing is the possibility do the dame for delete. `select_delete` isn’t atomic right?
More information about the erlang-questions