Say for example I have the following code:
{_,N} = ets:lookup(?MODULE,counter),
ok = ets:insert(?MODULE, {counter, N+1}).
and two processes attempt to access the code at the same time. What's
the best approach to prevent a race condition in this situation?
Thanks,
Dave