[erlang-questions] gen behaviors and global groups
Serge Aleynikov
saleyn@REDACTED
Fri Aug 29 03:39:53 CEST 2008
You are right - both gen_{fsm,server} have enter_loop/5 and
get_proc_name/1 that require very similar patching. Though the original
question still stands. I take a guess that perhaps global groups where
introduced later, and the implementation of gen behaviors wasn't brought
up to speed to include this feature. If that's the case, perhaps the
implementation can be safely adjusted as it shouldn't break any legacy
code, yet be quite useful for large deployments.
Serge
Gleb Peregud wrote:
> 2008/8/28 Serge Aleynikov <saleyn@REDACTED>:
>> Since I haven't seen any follow-up on this question, I'd like to rephrase
>> it. Is there any drawback in applying the attached patch that would allow
>> all gen behaviors to specify registered names in given global groups?
>>
>> Serge
>>
>
> Hi,
>
> It doesn't seem to take care about gen_server:enter_loop/2,3,4. From man:
>
> Module, Options and ServerName have the same meanings as when calling
> gen_server:start[_link]/3,4. However, if ServerName is specified, the
> process must have been registered accordingly before this function is
> called.
>
> and
>
> Failure: If the calling process was not started by a proc_lib start
> function, or if it is not registered according to ServerName.
>
> BR
More information about the erlang-questions
mailing list