Don't register name for pool_sup
This commit is contained in:
parent
d8aa7d9cfa
commit
f166143cd0
|
@ -41,10 +41,10 @@ start_link(Pool, Type, MFA) ->
|
||||||
|
|
||||||
-spec(start_link(atom(), atom(), pos_integer(), mfa()) -> {ok, pid()} | {error, any()}).
|
-spec(start_link(atom(), atom(), pos_integer(), mfa()) -> {ok, pid()} | {error, any()}).
|
||||||
start_link(Pool, Type, Size, MFA) ->
|
start_link(Pool, Type, Size, MFA) ->
|
||||||
supervisor:start_link({local, sup_name(Pool)}, ?MODULE, [Pool, Type, Size, MFA]).
|
supervisor:start_link(?MODULE, [Pool, Type, Size, MFA]).
|
||||||
|
|
||||||
sup_name(Pool) when is_atom(Pool) ->
|
%% sup_name(Pool) when is_atom(Pool) ->
|
||||||
list_to_atom(atom_to_list(Pool) ++ "_pool_sup").
|
%% list_to_atom(atom_to_list(Pool) ++ "_pool_sup").
|
||||||
|
|
||||||
init([Pool, Type, Size, {M, F, Args}]) ->
|
init([Pool, Type, Size, {M, F, Args}]) ->
|
||||||
ensure_pool(Pool, Type, [{size, Size}]),
|
ensure_pool(Pool, Type, [{size, Size}]),
|
||||||
|
|
Loading…
Reference in New Issue