[erlang-questions] Global registry documentation has a cryptic warning about code change
Metin Akat
akat.metin@REDACTED
Mon Feb 26 18:02:00 CET 2018
OK, upon another inspection of the warning... it probably says that the
Resolve function should be external to the module being reloaded.
Hence, global's resolve functions are perfectly fine in this regard, as
they are external to my code.
Now it seems quite logical and quite simply explained. I don't know why I
got confused at first.
On Mon, Feb 26, 2018 at 2:20 PM, Jesper Louis Andersen <
jesper.louis.andersen@REDACTED> wrote:
> 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/ef7a725d/attachment.htm>
More information about the erlang-questions
mailing list