The atom is never cleaned up and you will eventually run out of atoms.
What is the problem with Pids in json? Can't you just use a string?
{
"pid": "<0.12.0>"
}
Вопрос
I ask because
So registering a large number of processes consumes memory that is never recovered, right? Or does unregistering the name also clean up the atom?
Решение 2
The atom is never cleaned up and you will eventually run out of atoms.
What is the problem with Pids in json? Can't you just use a string?
{
"pid": "<0.12.0>"
}
Другие советы
You could use the gproc application instead of the register
function. Gproc allows you to use arbitrary erlang terms (e.g. a string) as the process alias.