diff options
Diffstat (limited to 'src/rexi.erl')
-rw-r--r-- | src/rexi.erl | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/rexi.erl b/src/rexi.erl index fd195a26..0eaa3249 100644 --- a/src/rexi.erl +++ b/src/rexi.erl @@ -14,7 +14,8 @@ stop() -> restart() -> stop(), start(). --spec cast(node(), mfa()) -> {ok, reference()}. +%% @equiv cast(Node, self(), MFA) +-spec cast(node(), mfa()) -> reference(). cast(Node, MFA) -> cast(Node, self(), MFA). @@ -22,14 +23,14 @@ cast(Node, MFA) -> %% You might want to use this instead of rpc:cast/4 for two reasons. First, %% the Caller pid and the returned reference are inserted into the remote %% process' dictionary as `rexi_from', so it has a way to communicate with you. -%% Second, the remote process is monitored. If it dies, Caller will receive a -%% message of the form `{rexi_EXIT, Ref, Reason}' where Ref is the returned -%% reference and Reason is the exit reason. --spec cast(node(), pid(), mfa()) -> {ok, reference()}. +%% Second, the remote process is monitored. If it exits with a Reason other +%% than normal, Caller will receive a message of the form +%% `{rexi_EXIT, Ref, Reason}' where Ref is the returned reference. +-spec cast(node(), pid(), mfa()) -> reference(). cast(Node, Caller, MFA) -> Ref = make_ref(), ok = gen_server:cast({?SERVER, Node}, {doit, {Caller,Ref}, MFA}), - {ok, Ref}. + Ref. %% @doc Sends an async kill signal to the remote process associated with Ref. %% No rexi_EXIT message will be sent. |