[erlang-questions] Global registry documentation has a cryptic warning about code change

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Mon Feb 26 13:20:54 CET 2018


It is a reference to the code replacement policy in Erlang:

http://erlang.org/doc/reference_manual/code_loading.html#id90252 (Section
on Code Replacement in the Reference manual)

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.

On Mon, Feb 26, 2018 at 10:37 AM Metin Akat <akat.metin@REDACTED> wrote:

> Hi,
>
> Global has this warning box in the doc page:
>
> "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."
>
> Could someone please explain what this means?
> 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?
>
> Thanks,
> Metin
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180226/6189b791/attachment.htm>


More information about the erlang-questions mailing list