ML
Size: a a a
ML
СИ
ML
СИ
AB
YP
С
% file: my_app_sup.erl
init([]) ->
SupFlags = #{strategy => one_for_one,
intensity => 5,
period => 5},
TestUDPServer = #{
id => test_udp_server,
start => {test_udp_server_mod, start, []},
% restart => permanent,
% shutdown => 2000,
type => worker,
modules => [test_udp_server_mod]
},
ChildSpecs = [TestUDPServer],
{ok, {SupFlags, ChildSpecs}}.
file: test_udp_server_mod.erl
start() ->
io:format("Starting worker ~p ~n», [self()]),
{ok, self()}.
AK
AK
ML
AB
ML
ML
С
AB
R
AB
ML
AB