[erlang-questions] compare and set semantics using ets?

Jesper Louis Andersen <>
Mon Jan 14 16:01:31 CET 2013

On Jan 14, 2013, at 1:08 PM, Anton Lebedevich <> wrote:

> Is it possible to implement atomic compare-and-set semantics using ets?

Only in a limited fashion. I guess we either need a specific CAS-instruction, or you have to look up how it is achieved in mnesia, which does to transactional updates.

CAS would relate to modern hardware implementations of software transactional memory.

Jesper Louis Andersen
  Erlang Solutions Ltd., Copenhagen

More information about the erlang-questions mailing list