diff options
author | Adam Kocoloski <adam@cloudant.com> | 2010-05-10 16:07:24 -0400 |
---|---|---|
committer | Brad Anderson <brad@cloudant.com> | 2010-05-10 16:36:57 -0400 |
commit | ca12b1656e39afd117880526a34e5320fb3bc976 (patch) | |
tree | 0ddfdb573b18e91ab6fdd2cc3981cbbb539b6779 | |
parent | cadb7ffad91c9a79f454fc215fa135ceef0910c5 (diff) |
drop ok tag from cast() responses, update docs (cherry picked from commit 23bc964bdd8b89be9af53cdd4da53603fe2edb3f)
-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. |