[erlang-questions] Re gistering a process with multiple names
Thijs Terlouw
thijsterlouw@REDACTED
Sat Jan 24 15:06:27 CET 2009
Vlad Dumitrescu-2 wrote:
>
> 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.
If you use the global module to register (instead of erlang module), you can
also use terms instead of just atoms:
global:register_name(Name, Pid)
Name = term()
Pid = pid()
I never understood why erlang:register only accepts atoms. Seems a waste to
me.
-----
- Thijs Terlouw, http://www.startinchina.com Shenzhen, China
--
View this message in context: http://www.nabble.com/Registering-a-process-with-multiple-names-tp21601309p21640975.html
Sent from the Erlang Questions mailing list archive at Nabble.com.
More information about the erlang-questions
mailing list