diff options
author | Siri Hansen <[email protected]> | 2014-11-06 14:48:36 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2014-11-06 14:48:36 +0100 |
commit | eeba41c3f9a56948d62de66065851f509ae02b43 (patch) | |
tree | c73dd9ceb2fbd71e5c0a6713715b7a4df56838db /lib/tools/emacs/erlang-skels.el | |
parent | 5349afa77f6daca3525ed1b5e1081c5379a4ca65 (diff) | |
parent | d69c45710f1beb570151dd6e2d35d6a3925d9029 (diff) | |
download | otp-eeba41c3f9a56948d62de66065851f509ae02b43.tar.gz otp-eeba41c3f9a56948d62de66065851f509ae02b43.tar.bz2 otp-eeba41c3f9a56948d62de66065851f509ae02b43.zip |
Merge branch 'siri/sup-spec-maps/OTP-11043'
* siri/sup-spec-maps/OTP-11043:
Update emacs skeleton for supervisor to use maps
Update dialyzer test with maps in supervisor properties
Add documentation of maps in supervisor flags and child specs
Add test of maps in supervisor flags and child specs
New function supervisor:get_childspec/2
Allow maps for supervisor flags and child specs
Rebase supervisor
Add more tests of supervisor
Diffstat (limited to 'lib/tools/emacs/erlang-skels.el')
-rw-r--r-- | lib/tools/emacs/erlang-skels.el | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/lib/tools/emacs/erlang-skels.el b/lib/tools/emacs/erlang-skels.el index 78929ac510..8d2c02e455 100644 --- a/lib/tools/emacs/erlang-skels.el +++ b/lib/tools/emacs/erlang-skels.el @@ -1,7 +1,7 @@ ;; ;; %CopyrightBegin% ;; -;; Copyright Ericsson AB 2010. All Rights Reserved. +;; Copyright Ericsson AB 2010-2014. All Rights Reserved. ;; ;; The contents of this file are subject to the Erlang Public License, ;; Version 1.1, (the "License"); you may not use this file except in @@ -352,26 +352,25 @@ Please see the function `tempo-define-template'.") "%% @doc" n "%% Whenever a supervisor is started using supervisor:start_link/[2,3]," n "%% this function is called by the new process to find out about" n - "%% restart strategy, maximum restart frequency and child" n + "%% restart strategy, maximum restart intensity, and child" n "%% specifications." n "%%" n "%% @spec init(Args) -> {ok, {SupFlags, [ChildSpec]}} |" n "%% ignore |" n "%% {error, Reason}" n (erlang-skel-separator-end 2) - "init([]) ->" n> - "RestartStrategy = one_for_one," n> - "MaxRestarts = 1000," n> - "MaxSecondsBetweenRestarts = 3600," n - "" n> - "SupFlags = {RestartStrategy, MaxRestarts, MaxSecondsBetweenRestarts}," n + "init([]) ->" n "" n> - "Restart = permanent," n> - "Shutdown = 2000," n> - "Type = worker," n + "SupFlags = #{strategy => one_for_one," n> + "intensity => 1," n> + "period => 5}," n "" n> - "AChild = {'AName', {'AModule', start_link, []}," n> - "Restart, Shutdown, Type, ['AModule']}," n + "AChild = #{id => 'AName'," n> + "start => {'AModule', start_link, []}," n> + "restart => permanent," n> + "shutdown => 5000," n> + "type => worker," n> + "modules => ['AModule']}," n "" n> "{ok, {SupFlags, [AChild]}}." n n @@ -379,7 +378,7 @@ Please see the function `tempo-define-template'.") "%%% Internal functions" n (erlang-skel-double-separator-end 3) ) - "*The template of an supervisor behaviour. + "*The template of a supervisor behaviour. Please see the function `tempo-define-template'.") (defvar erlang-skel-supervisor-bridge @@ -449,7 +448,7 @@ Please see the function `tempo-define-template'.") "%%% Internal functions" n (erlang-skel-double-separator-end 3) ) - "*The template of an supervisor_bridge behaviour. + "*The template of a supervisor_bridge behaviour. Please see the function `tempo-define-template'.") (defvar erlang-skel-generic-server |