[erlang-questions] Registering a process with multiple names
Vlad Dumitrescu
vladdu55@REDACTED
Thu Jan 22 11:40:00 CET 2009
Hi!
2009/1/22 Torben Hoffmann <torben.lehoff@REDACTED>:
> In my ideal world I would like to register the call process with two names:
> one for the legacy call identificator and on for the protocol's call
> identificator.
>
> The problem is that erlang:register/2 barfs if you try to register a process
> more than once.
You could use your own registry, that would keep track of both names
and map them to either a registered name or a pid.
If your process names are dynamically generated, you might want to
avoid using atoms (i.e. erlang:register/2) for them. Your registry
could use any term as name.
regards,
Vlad
More information about the erlang-questions
mailing list