refactor: use `emqx_pool:async_submit` to avoid excessive spawning
This commit is contained in:
parent
eb41b77de4
commit
3b1e436d3f
|
@ -824,7 +824,7 @@ reply_dropped(_ReplyTo = {Fn, Args, #{reply_dropped := true}}, Result) when
|
|||
is_function(Fn), is_list(Args)
|
||||
->
|
||||
%% We want to avoid bumping metrics inside the buffer worker, since it's costly.
|
||||
spawn(fun() -> erlang:apply(Fn, Args ++ [Result]) end),
|
||||
emqx_pool:async_submit(Fn, Args ++ [Result]),
|
||||
ok;
|
||||
reply_dropped(_ReplyTo, _Result) ->
|
||||
ok.
|
||||
|
|
Loading…
Reference in New Issue