summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ebin/rexi.app3
-rw-r--r--src/rexi.erl2
-rw-r--r--src/rexi_server.erl6
3 files changed, 5 insertions, 6 deletions
diff --git a/ebin/rexi.app b/ebin/rexi.app
index b00cc4f6..6e80386a 100644
--- a/ebin/rexi.app
+++ b/ebin/rexi.app
@@ -4,6 +4,5 @@
{modules, [rexi, rexi_app, rexi_sup, rexi_monitor, rexi_server]},
{registered, [rexi_sup, rexi_server]},
{applications, [kernel, stdlib]},
- {mod, {rexi_app,[]}},
- {start_phases, []}
+ {mod, {rexi_app,[]}}
]}. \ No newline at end of file
diff --git a/src/rexi.erl b/src/rexi.erl
index a344af7d..8f1d72bf 100644
--- a/src/rexi.erl
+++ b/src/rexi.erl
@@ -26,7 +26,7 @@ cast(Node, MFA) ->
%% process' dictionary as `rexi_from', so it has a way to communicate with you.
%% 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.
+%% `{Ref, {rexi_EXIT, Reason}}' where Ref is the returned reference.
-spec cast(node(), pid(), mfa()) -> reference().
cast(Node, Caller, MFA) ->
Ref = make_ref(),
diff --git a/src/rexi_server.erl b/src/rexi_server.erl
index 1589ba3b..8b922275 100644
--- a/src/rexi_server.erl
+++ b/src/rexi_server.erl
@@ -1,6 +1,6 @@
-module(rexi_server).
-behaviour(gen_server).
--export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2,
+-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2,
code_change/3]).
-export([start_link/0, init_p/2]).
@@ -18,7 +18,7 @@ init([]) ->
{ok, #st{}}.
handle_call(_Request, _From, St) ->
- {reply, ok, St}.
+ {reply, ignored, St}.
handle_cast({doit, From, MFA}, #st{workers=Workers} = St) ->
{LocalPid, Ref} = spawn_monitor(?MODULE, init_p, [From, MFA]),
@@ -69,4 +69,4 @@ find_worker(Ref, List) ->
lists:keyfind(Ref, 2, List).
notify_caller({Caller, Ref}, Reason) ->
- spawn(erlang, send, [Caller, {rexi_EXIT, Ref, Reason}]).
+ Caller ! {Ref, {rexi_EXIT, Reason}}.