[erlang-questions] Global lock is unfair?
Andrew Thompson
andrew@REDACTED
Tue May 15 17:53:32 CEST 2018
On Mon, May 14, 2018 at 04:53:08PM -0500, Ryan Stewart wrote:
> Funneling all the calls through a single process would bring the system to
> a grinding halt. Sure, I could write a system of processes, each of which
> acts as a mutex to one, particular resource, but why would I want to? All I
> need is locking, just like global locks, but fair. It seems like something
> that should already exist in a proven library.
>
For simple cases, wrapping a process around the individual resource and
using it as a lock is actually fine and should scale well. If you want
something fancier, there's Ulf's library:
https://github.com/uwiger/locks
Andrew
More information about the erlang-questions
mailing list