<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Use a single Erlang process. It will
only be able to handle a single message at a time (other messages
will get queued in-order) and the behavior will be fair.<br>
<br>
<br>
On 05/14/2018 12:55 PM, Ryan Stewart wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CA+ZzX4r7SeOm6q2k8UgY0urpw-WhQ1sgvAec4T0KwOa4fYvmww@mail.gmail.com">
<div dir="ltr">My team has used global:set_lock() to implement a
sort of simple mutex system on a set of resources. It turns out
that this function seems to have no concept of fairness. One
process might request a lock and not get it until 20 other
processes have requested and gotten said lock, out of request
order. Is there any easy way to do fair locking?<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
erlang-questions mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
</blockquote>
<p><br>
</p>
</body>
</html>