[erlang-questions] Registering a process with multiple names
Thu Jan 22 11:40:00 CET 2009
2009/1/22 Torben Hoffmann <>:
> 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
> 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.
More information about the erlang-questions