diff options
author | Adam Kocoloski <adam@cloudant.com> | 2010-05-10 16:07:24 -0400 |
---|---|---|
committer | Adam Kocoloski <adam@cloudant.com> | 2010-05-10 16:12:16 -0400 |
commit | c30010994b78818b758e6bb9da2017984a14fb63 (patch) | |
tree | 0ddfdb573b18e91ab6fdd2cc3981cbbb539b6779 | |
parent | 50cef5b4882ebe8f85ca0513f073f3cf6dc68502 (diff) |
drop ok tag from cast() responses, update docs
-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. |