本文共 3486 字,大约阅读时间需要 11 分钟。
1 | {Id, StartFunc, Restart, Shutdown, Type, Modules} |
1 | supervisor:start_link(CallbackModuleName, InitCallbackParamList). |
1 | supervisor:start_child(Sup, ChildSpec) |
1 | supervisor:terminate_child(Sup, Id) |
1 | supervisor:delete_child(Sup, Id) |
1 2 3 4 5 6 7 8 9 10 11 12 13 | -module(simple_sup). -behaviour(supervisor). - export ([start_link /0 ]). - export ([init /1 ]). start_link() -> supervisor:start_link(simple_sup, []). init(_Args) -> {ok, { {simple_one_for_one, 0, 1}, [{call, {call, start_link, []}, temporary, brutal_kill, worker, [call]}]}}. |
1 | supervisor:start_child(Sup, List) |
转载地址:http://jvqoo.baihongyu.com/