aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/gen_statem.erl
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2016-02-19 09:39:46 +0100
committerRaimo Niskanen <[email protected]>2016-02-19 09:39:46 +0100
commitfc1e649e3613f18dec8514921d0439ddcca73bdb (patch)
treec450dbb70177f21cb30ef99962fa4fa728acf774 /lib/stdlib/src/gen_statem.erl
parent65767cfc36cf8658b45d68b3c17d4bd612198165 (diff)
downloadotp-fc1e649e3613f18dec8514921d0439ddcca73bdb.tar.gz
otp-fc1e649e3613f18dec8514921d0439ddcca73bdb.tar.bz2
otp-fc1e649e3613f18dec8514921d0439ddcca73bdb.zip
Add reply([Reply])
Diffstat (limited to 'lib/stdlib/src/gen_statem.erl')
-rw-r--r--lib/stdlib/src/gen_statem.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/stdlib/src/gen_statem.erl b/lib/stdlib/src/gen_statem.erl
index 3da4443f13..8aa8afd091 100644
--- a/lib/stdlib/src/gen_statem.erl
+++ b/lib/stdlib/src/gen_statem.erl
@@ -389,9 +389,12 @@ call(ServerRef, Request, Timeout) ->
end.
%% Reply from a state machine callback to whom awaits in call/2
--spec reply(ReplyOperation :: reply_operation()) -> ok.
+-spec reply([reply_operation()] | reply_operation()) -> ok.
reply({reply,{_To,_Tag}=Client,Reply}) ->
- reply(Client, Reply).
+ reply(Client, Reply);
+reply(Replies) when is_list(Replies) ->
+ [reply(Reply) || Reply <- Replies],
+ ok.
%%
-spec reply(Client :: client(), Reply :: term()) -> ok.
reply({To,Tag}, Reply) ->