uwiger / gproc

Extended process registry for Erlang
Apache License 2.0
1.07k stars 232 forks source link

The value of `auto_size` is not judged when the worker is removed #185

Open tigercl opened 3 years ago

tigercl commented 3 years ago

When you do not use auto_size, every time you remove a worker, the size of the pool will become smaller. When it becomes 0, you will never be able to add a worker.

tigercl commented 3 years ago

I think the problem is in function del_slot, the following part of the code should be redundant:

del_slot(Name, [{Name,_}]) ->
    [];

At the same time, the code in do_remove_worker_ seems to be missing the processing of auto_size.