aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/gen_server.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-04-15 09:38:41 +0200
committerHans Bolinder <[email protected]>2014-04-28 11:56:26 +0200
commit146260727638e8a477aeda7828364ce45dc506a0 (patch)
treec54b396192cb875eea1c474baff18c136473b95c /lib/stdlib/src/gen_server.erl
parent3be1dc100140139b2542cd327cf4f8453d43aca1 (diff)
downloadotp-146260727638e8a477aeda7828364ce45dc506a0.tar.gz
otp-146260727638e8a477aeda7828364ce45dc506a0.tar.bz2
otp-146260727638e8a477aeda7828364ce45dc506a0.zip
Introduce the attribute -optional_callbacks in the context of behaviours
Diffstat (limited to 'lib/stdlib/src/gen_server.erl')
-rw-r--r--lib/stdlib/src/gen_server.erl11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/stdlib/src/gen_server.erl b/lib/stdlib/src/gen_server.erl
index 202a931fae..22acdf10b7 100644
--- a/lib/stdlib/src/gen_server.erl
+++ b/lib/stdlib/src/gen_server.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-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
@@ -137,6 +137,15 @@
-callback code_change(OldVsn :: (term() | {down, term()}), State :: term(),
Extra :: term()) ->
{ok, NewState :: term()} | {error, Reason :: term()}.
+-callback format_status(Opt, StatusData) -> Status when
+ Opt :: 'normal' | 'terminate',
+ StatusData :: [PDict | State],
+ PDict :: [{Key :: term(), Value :: term()}],
+ State :: term(),
+ Status :: term().
+
+-optional_callbacks([format_status/2]).
+
%%% -----------------------------------------------------------------
%%% Starts a generic server.