소스 검색

pf:gen_*不能call自己

master
SisMaker 3 년 전
부모
커밋
896ed450c6
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. +6
    -1
      src/gen_call.erl

+ 6
- 1
src/gen_call.erl 파일 보기

@ -41,7 +41,12 @@ do_call(Process, Label, Request, Timeout) ->
%% Local without timeout; no need to use alias since we unconditionally
%% will wait for either a reply or a down message which corresponds to
%% 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
{Mref, Reply} ->
erlang:demonitor(Mref, [flush]),

불러오는 중...
취소
저장