|
@ -416,6 +416,15 @@ multi_call(Nodes, Name, Request, infinity) -> |
|
|
multi_call(Nodes, Name, Request, Timeout) when is_list(Nodes), is_atom(Name), is_integer(Timeout), Timeout >= 0 -> |
|
|
multi_call(Nodes, Name, Request, Timeout) when is_list(Nodes), is_atom(Name), is_integer(Timeout), Timeout >= 0 -> |
|
|
do_multi_call(Nodes, Name, Request, Timeout). |
|
|
do_multi_call(Nodes, Name, Request, Timeout). |
|
|
|
|
|
|
|
|
|
|
|
do_multi_call([Node], Name, Req, infinity) when Node =:= node() -> |
|
|
|
|
|
% Special case when multi_call is used with local node only. |
|
|
|
|
|
% In that case we can leverage the benefit of recv_mark optimisation |
|
|
|
|
|
% existing in simple gen:call. |
|
|
|
|
|
try gen:call(Name, '$gen_call', Req, infinity) of |
|
|
|
|
|
{ok, Res} -> {[{Node, Res}],[]} |
|
|
|
|
|
catch exit:_ -> |
|
|
|
|
|
{[], [Node]} |
|
|
|
|
|
end; |
|
|
do_multi_call(Nodes, Name, Request, infinity) -> |
|
|
do_multi_call(Nodes, Name, Request, infinity) -> |
|
|
Tag = make_ref(), |
|
|
Tag = make_ref(), |
|
|
Monitors = send_nodes(Nodes, Name, Tag, Request), |
|
|
Monitors = send_nodes(Nodes, Name, Tag, Request), |
|
@ -718,7 +727,7 @@ matchCallMsg(Parent, Name, Module, HibernateAfterTimeout, Debug, Timers, CurStat |
|
|
FunName = element(1, Request), |
|
|
FunName = element(1, Request), |
|
|
Module:FunName(Request, CurState, From); |
|
|
Module:FunName(Request, CurState, From); |
|
|
_ -> |
|
|
_ -> |
|
|
Module:Request(CurState, From) |
|
|
|
|
|
|
|
|
Module:Request(Request, CurState, From) |
|
|
end |
|
|
end |
|
|
of |
|
|
of |
|
|
Result -> |
|
|
Result -> |
|
@ -738,7 +747,7 @@ matchCastMsg(Parent, Name, Module, HibernateAfterTimeout, Debug, Timers, CurStat |
|
|
FunName = element(1, Cast), |
|
|
FunName = element(1, Cast), |
|
|
Module:FunName(Cast, CurState); |
|
|
Module:FunName(Cast, CurState); |
|
|
_ -> |
|
|
_ -> |
|
|
Module:Cast(CurState) |
|
|
|
|
|
|
|
|
Module:Cast(Cast, CurState) |
|
|
end |
|
|
end |
|
|
of |
|
|
of |
|
|
Result -> |
|
|
Result -> |
|
@ -1150,11 +1159,7 @@ format_log_multi(#{label := {gen_apu, terminate}, |
|
|
Args = |
|
|
Args = |
|
|
case Depth of |
|
|
case Depth of |
|
|
unlimited -> |
|
|
unlimited -> |
|
|
[Name, Msg, State, Reason1] ++ |
|
|
|
|
|
case Log of |
|
|
|
|
|
[] -> []; |
|
|
|
|
|
_ -> Log |
|
|
|
|
|
end ++ ClientArgs; |
|
|
|
|
|
|
|
|
[Name, Msg, State, Reason1] ++ Log ++ ClientArgs; |
|
|
_ -> |
|
|
_ -> |
|
|
[Name, Depth, Msg, Depth, State, Depth, Reason1, Depth] ++ |
|
|
[Name, Depth, Msg, Depth, State, Depth, Reason1, Depth] ++ |
|
|
case Log of |
|
|
case Log of |
|
|