From c30010994b78818b758e6bb9da2017984a14fb63 Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Mon, 10 May 2010 16:07:24 -0400 Subject: drop ok tag from cast() responses, update docs --- src/rexi.erl | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src') 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. -- cgit v1.2.3