[erlang-questions] -pidname( <atom> ) Was: Why we need a -module() attribute?
Fri Feb 26 07:02:13 CET 2016
> Almost all process registrations should be local to the module that registers
> them. I proposed
> for declaring a module-locale atomic variable to hold pids. This would be both
> safer than the global registry and more efficient. The global registry would
> remain for those things that genuinely need to be global.
Presuming that the module name is , say, test, how is:
-pidname( test )
register( ?MODULE, self() )?
Also, how would you run multiple instances of the same module within the same run-time?
Your proposal may appear to solve one problem (that is, if one chose to call it a problem), but appears to introduce at least one more.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions