Atom generation

Vlad Dumitrescu vlad_dumitrescu@REDACTED
Thu Dec 4 14:54:15 CET 2003

From: "Bengt Kleberg" <Bengt.Kleberg@REDACTED>
> Chenniappan,Dhanasekaran [DBA] wrote:
> > hi,
> >  I have a process that has to be created as multiple instances and register
> > with different names, Now my problem is i am not able to craete the process
> > names on runtime for register(Atoms like proc1,proc2,...). Please help me in
> > this process.
> 1 make sure that the number of processes is bounded since there is an
> upper limit on the number of atoms in the system. the limit is large
> (hundreds of thousands), but it exists.

If this can't be ensured [1], then it might be better to use a separate process
that maps something like {proc, 2} to a pid and use it as a proxy to the worker

[1] If the processes are that many, I suppose that having registered names
become quite meaningless -- one could use the pid instead just as well.


More information about the erlang-questions mailing list