Explicitly matching casts with 'ok'.
authorSiraaj Khandkar <siraaj@khandkar.net>
Fri, 27 Jul 2012 03:18:37 +0000 (23:18 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Fri, 27 Jul 2012 03:18:37 +0000 (23:18 -0400)
001/src/life_cell.erl
001/src/life_time.erl

index ada70e6..e7cebcd 100644 (file)
@@ -80,7 +80,7 @@ handle_cast({next_gen, GenID},
 %% possible. The more there're cells, the more likely this is to happen.)
 handle_cast({state_broadcast, ReceivedGenID, _NeighborState}=Msg,
     #state{gen_id=GenID, name=Name}=State) when GenID =/= ReceivedGenID->
-    gen_server:cast(Name, Msg),
+    ok = gen_server:cast(Name, Msg),
     {noreply, State};
 
 
index 49ab646..2552421 100644 (file)
@@ -62,7 +62,7 @@ init([X, Y, Cells]) ->
                   ,replies_pending = 0
                   ,gen_id          = 0
                   },
-    schedule_next_gen(),
+    ok = schedule_next_gen(),
     {ok, State}.
 
 
@@ -117,7 +117,7 @@ handle_cast({report_state, {CellID, GenID, CellState}},
             ok = do_print_bar(X),
             ok = do_print_state_chars(X, StateChars),
             ok = timer:sleep(?INTERVAL),
-            schedule_next_gen(),
+            ok = schedule_next_gen(),
             {noreply, NewState#state{state_pairs=[]}};
 
         _N ->
@@ -137,7 +137,7 @@ handle_info(_Msg, State) ->
 %% ============================================================================
 
 schedule_next_gen() ->
-    gen_server:cast(?MODULE, next_gen).
+    ok = gen_server:cast(?MODULE, next_gen).
 
 
 cast_all([], _) -> ok;
This page took 0.033546 seconds and 4 git commands to generate.