You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def call_linksafe(name, max, func) do
if acquire(name, max) do
safe_key = {name, self()}
inserted = ETS.insert_new(@call_safe_table, [safe_key])
What if the process killed before ETS.insert_new(@call_safe_table, [safe_key]) ?
Seems like we still have problem, although time window for this is rather small.
The text was updated successfully, but these errors were encountered:
It doesn't look like the current implementation is correct in this regard as it doesn't guarantee the atomicity of acquiring the lock and saving the pid of the caller that acquired the lock.
What if the process killed before
ETS.insert_new(@call_safe_table, [safe_key])
?Seems like we still have problem, although time window for this is rather small.
The text was updated successfully, but these errors were encountered: