Skip to content

Commit

Permalink
Upgraded to gen_pnet 0.1.7.
Browse files Browse the repository at this point in the history
  • Loading branch information
joergen7 committed Sep 12, 2017
1 parent 66770aa commit 23ddcc4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{cover_enabled, true}.

{deps, [
{gen_pnet, "0.1.6"}
{gen_pnet, "0.1.7"}
]}.

{eunit_opts, [verbose]}.
Expand Down
4 changes: 2 additions & 2 deletions src/cre_client.erl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ start_link( ClientName, CreName, ClientMod, ClientArg ) ->
[] ).

eval( ClientName, T ) ->
gen_pnet:call( ClientName, {eval, T} ).
gen_pnet:call( ClientName, {eval, T}, infinity ).

demand( ClientName ) ->
gen_pnet:cast( ClientName, demand ).
Expand Down Expand Up @@ -156,7 +156,7 @@ when is_atom( ClientMod ) ->

cre_master:add_client( CreName, self() ),

{ok, gen_pnet:new( ?MODULE, ClientState )}.
ClientState.


-spec terminate( Reason :: _, NetState :: _ ) -> ok.
Expand Down
4 changes: 2 additions & 2 deletions src/cre_master.erl
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ code_change( _OldVsn, NetState, _Extra ) -> {ok, NetState}.
handle_call( _Request, _From, _NetState ) -> {reply, {error, bad_msg}}.
terminate( _Reason, _NetState ) -> ok.

init( [] ) ->
init( _MasterArg ) ->
process_flag( trap_exit, true ),
{ok, gen_pnet:new( ?MODULE, [] )}.
[].

handle_cast( {add_worker, P}, _ ) ->
io:format( "cre_master:handle_cast received add worker~n CRE: ~p~n Worker: ~p~n", [self(), P] ),
Expand Down
2 changes: 1 addition & 1 deletion src/cre_worker.erl
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ init( {CreName, WrkMod, WrkArg} ) ->

ok = cre_master:add_worker( CreName, self() ),

{ok, gen_pnet:new( ?MODULE, WrkState )}.
WrkState.

terminate( _Reason, _NetState ) -> ok.

Expand Down

0 comments on commit 23ddcc4

Please sign in to comment.