[erlang-questions] Atomically updating a record in ETS table

Martin Dimitrov mrtndimitrov@REDACTED
Wed Oct 23 13:06:30 CEST 2013


Hello everyone,

I have an ETS table that contains records of the following format:

{Key, List}

For example, {key123, [a,b,c]}. Now I have to add to the list a new
item, say 'd'. I have to select the record, add the new value to the
list and replace the record with the new list. But how to do this
atomically? Many processes might try to add an item to a record. Some
sort of "critical section"?

Thanks in advance,
Martin



More information about the erlang-questions mailing list