gproc icon indicating copy to clipboard operation
gproc copied to clipboard

gproc_pool timer message leaks?

Open leoliu opened this issue 9 years ago • 1 comments
trafficstars

I am investigating gproc_pool for pooling DB connections. It seems if the following timer expires its message will be left in current process's mailbox leading to a leak.

setup_wait({busy_wait, MS}, Pool) ->
    Ref = erlang:send_after(MS, self(), {claim, Pool}),
    {busy_wait, Ref}.

leoliu avatar Nov 13 '16 10:11 leoliu

That seems correct. The message would need to be consumed about here: https://github.com/uwiger/gproc/blob/master/src/gproc_pool.erl#L570

uwiger avatar Nov 13 '16 11:11 uwiger