|
@ -41,7 +41,12 @@ do_call(Process, Label, Request, Timeout) -> |
|
|
%% Local without timeout; no need to use alias since we unconditionally |
|
|
%% Local without timeout; no need to use alias since we unconditionally |
|
|
%% will wait for either a reply or a down message which corresponds to |
|
|
%% will wait for either a reply or a down message which corresponds to |
|
|
%% the process being terminated (as opposed to 'noconnection')... |
|
|
%% the process being terminated (as opposed to 'noconnection')... |
|
|
Process ! {Label, {self(), Mref}, Request}, |
|
|
|
|
|
|
|
|
case self() of |
|
|
|
|
|
Process -> |
|
|
|
|
|
exit(calling_self); |
|
|
|
|
|
_ -> |
|
|
|
|
|
Process ! {Label, {self(), Mref}, Request}, |
|
|
|
|
|
end, |
|
|
receive |
|
|
receive |
|
|
{Mref, Reply} -> |
|
|
{Mref, Reply} -> |
|
|
erlang:demonitor(Mref, [flush]), |
|
|
erlang:demonitor(Mref, [flush]), |
|
|