Skip to content

Commit

Permalink
support timeout on pts:call
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Kolesnikov committed Apr 29, 2013
1 parent 5a9a6c6 commit 49e8766
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pts.erl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
remove/2, remove/3, remove_/2, remove_/3,

% communicate with process
call/3, cast/3, send/3, ack/2,
call/3, call/4, cast/3, send/3, ack/2,

% map, fold bucket
map/2, fold/3
Expand Down Expand Up @@ -146,10 +146,14 @@ remove_(Ns, Key, false) ->
%%
%%
-spec(call/3 :: (atom(), any(), any()) -> any()).
-spec(call/4 :: (atom(), any(), any(), timeout()) -> any()).

call(Ns, Key, Msg) ->
gen_server:call(pns:whereis(Ns), {call, Key, Msg}).

call(Ns, Key, Msg, Timeout) ->
gen_server:call(pns:whereis(Ns), {call, Key, Msg}, Timeout).

%%
%%
-spec(cast/3 :: (atom(), any(), any()) -> ok).
Expand Down

0 comments on commit 49e8766

Please sign in to comment.