It's hard to predict what *could* get registered after start-up - are
there guarantees anywhere? But I've found a way to get by, for now.
Since I'm using the process registry in a kind of hacky way at the
moment, and need to know what I *haven't* registered myself, I
initially get the list of what's currently registered using a call to
registered/0
http://www.erlang.org/doc/reference_manual/processes.html#id82208
shortly after starting the Erlang shell. I'm not sure how a standalone
app would figure out when a call to registered/0 would return the
complete list -- whatever "complete" means in this case. Does anyone
know? It seems like you'd have to get complete initialization of
everything you use that might register a process, and maybe the only
way to be sure is to keep checking against a list of names to see if
the process has been registered yet. And if you already have that list
....
I also qualify the process names I use, prefixing each with a period
('.'), to help avoid any future clashes. This means putting single
quotes around each process-name atom, but I can live with that. It's
dangerous in the long run, I hope to move to a more sensible scheme
soon, but it's fine for now.
-michael turner
> _______________________________________________
> erlang-questions mailing list
>
erlang-q...@erlang.org
>
http://erlang.org/mailman/listinfo/erlang-questions
>
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions