Skip to content
This repository was archived by the owner on Nov 17, 2020. It is now read-only.

Commit e3bdb86

Browse files
committed
Make callback prep_stop/0 optional
1 parent 9c34251 commit e3bdb86

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/supervisor2.erl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,13 @@
142142
[ChildSpec :: child_spec()]}}
143143
| ignore.
144144

145-
-callback prep_stop() -> ok.
145+
%% Optional callback prep_stop/0. It cannot be exported as Erlang/OTP doesn't
146+
%% support definition of optional callbacks.
147+
%%
148+
%% Currently used to stop application dependencies.
149+
%%
150+
%% -callback prep_stop() -> ok.
151+
%%
146152

147153
-define(restarting(_Pid_), {restarting,_Pid_}).
148154

0 commit comments

Comments
 (0)