semaphore icon indicating copy to clipboard operation
semaphore copied to clipboard

Revise `call_linksafe/3` to keep track of multiple procs per semaphore

Open brennana opened this issue 2 years ago • 0 comments

Before, call_linksafe/3 used an ETS set to store a single PID per semaphore key, which does not allow for appropriate sweeping when a semaphore is acquired by more than one process at once.

The linksafe table has been changed to an ETS bag (multiple unique PIDs per semaphore key), along with appropriate related changes. The function test has also been extended to ensure correct behavior in the normal case, as well as when multiple dead procs require sweeping.

brennana avatar Mar 02 '22 02:03 brennana