<div dir="ltr"><span style="font-size:12.800000190734863px">OK, upon another inspection of the warning... it probably says that the Resolve function should be external to the module being reloaded.</span><div style="font-size:12.800000190734863px">Hence, global's resolve functions are perfectly fine in this regard, as they are external to my code.</div><div style="font-size:12.800000190734863px">Now it seems quite logical and quite simply explained. I don't know why I got confused at first.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 26, 2018 at 2:20 PM, Jesper Louis Andersen <span dir="ltr"><<a href="mailto:jesper.louis.andersen@gmail.com" target="_blank">jesper.louis.andersen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>It is a reference to the code replacement policy in Erlang:<br><br><a href="http://erlang.org/doc/reference_manual/code_loading.html#id90252" target="_blank">http://erlang.org/doc/<wbr>reference_manual/code_loading.<wbr>html#id90252</a> (Section on Code Replacement in the Reference manual)<br><br></div>If you don't make an explicit call to the module, then the code will never replace if a newer version of the module is loaded. This means that when another load happens, the old version gets purged, and your process will then be terminated.<br></div><br><div class="gmail_quote"><div><div class="h5"><div dir="ltr">On Mon, Feb 26, 2018 at 10:37 AM Metin Akat <<a href="mailto:akat.metin@gmail.com" target="_blank">akat.metin@gmail.com</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi,<div><br></div><div>Global has this warning box in the doc page:</div><div><br></div><div>"If you plan to change code without restarting your system, you must use an external fun (fun Module:Function/Arity) as function Resolve. If you use a local fun, you can never replace the code for the module that the fun belongs to."<br></div><div><br></div><div>Could someone please explain what this means?</div><div>If I have a simple_one_for_one supervisor with many workers which register via global, what does the above mean if I want to reload them via the `sync` library (for development). Can I not use the default Resolve and why?</div><div><br></div><div>Thanks,</div><div>Metin</div><div><br></div><div><br></div></div></div></div>
______________________________<wbr>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/<wbr>listinfo/erlang-questions</a><br>
</blockquote></div>
</blockquote></div><br></div>