@@ -440,7 +440,7 @@ call(Name, Request, TimeoutMs) when is_atom(Name) ->
440
440
end ;
441
441
call (Pid , Request , TimeoutMs ) when is_pid (Pid ) ->
442
442
MonitorRef = monitor (process , Pid ),
443
- Pid ! {'$call ' , {self (), MonitorRef }, Request },
443
+ Pid ! {'$gen_call ' , {self (), MonitorRef }, Request },
444
444
receive
445
445
{'DOWN' , MonitorRef , process , Pid , {E , []} = _Reason } ->
446
446
erlang :exit ({E , {? MODULE , ? FUNCTION_NAME , [Pid , Request ]}});
@@ -475,7 +475,7 @@ cast(Name, Request) when is_atom(Name) ->
475
475
cast (Pid , Request )
476
476
end ;
477
477
cast (Pid , Request ) when is_pid (Pid ) ->
478
- Pid ! {'$cast ' , Request },
478
+ Pid ! {'$gen_cast ' , Request },
479
479
ok .
480
480
481
481
% %-----------------------------------------------------------------------------
@@ -510,7 +510,7 @@ loop(Parent, #state{mod = Mod, mod_state = ModState} = State, {continue, Continu
510
510
end ;
511
511
loop (Parent , # state {mod = Mod , mod_state = ModState } = State , Timeout ) ->
512
512
receive
513
- {'$call ' , {_Pid , _Ref } = From , Request } ->
513
+ {'$gen_call ' , {_Pid , _Ref } = From , Request } ->
514
514
case Mod :handle_call (Request , From , ModState ) of
515
515
{reply , Reply , NewModState } ->
516
516
ok = reply (From , Reply ),
@@ -535,7 +535,7 @@ loop(Parent, #state{mod = Mod, mod_state = ModState} = State, Timeout) ->
535
535
_ ->
536
536
do_terminate (State , {error , unexpected_reply }, ModState )
537
537
end ;
538
- {'$cast ' , Request } ->
538
+ {'$gen_cast ' , Request } ->
539
539
case Mod :handle_cast (Request , ModState ) of
540
540
{noreply , NewModState } ->
541
541
loop (Parent , State # state {mod_state = NewModState }, infinity );
0 commit comments