<div dir="ltr">Dear list,<div>I'm trying to get an understanding of what global:set_lock/1,2,3 exactly does.</div><div><br></div><div>I read from the docs:</div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><font face="monospace, monospace">Sets a lock on the specified nodes (or on all nodes if none are specified) on ResourceId for LockRequesterId.</font></blockquote><div><br></div><div>Let's say that I want to perform a series of operations on mnesia schemas and want to avoid all other nodes accessing mnesia tables while one node is busy at it.</div><div><br></div><div>Is it enough to write:</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><font face="monospace, monospace">global:trans({{?MODULE, lock_mnesia_for_a_while}, self()},</font></div><div><font face="monospace, monospace">    fun() -></font></div><div><font face="monospace, monospace">        do_things_on_mnesia()</font></div><div><font face="monospace, monospace">    end).</font></div></blockquote><div><br></div><div>I don't get how this could lock mnesia for the other nodes.</div><div><br></div><div>Can some kind soul point me in the right direction?</div><div><br></div><div>Thank you,</div><div>r.</div></div>