gen_server handle_cast -> {noreply, State, Timeout}

Nav <>
Thu Feb 17 14:43:35 CET 2011


I am not sure where I am going wrong having read the documentation :)

init() -> {ok, State}

handle_cast(pattern1, State) -> {noreply, State};
handle_cast(pattern2, State) -> {noreply, State, 5000};
handle_cast(pattern3, State) -> {noreply, State};
handle_cast(All, State) -> {noreply, State}.

handle_info(timeout, State) -> Actions, {noreply, State, 5000}.


My requirement is that if handle_cast(pattern2, State) is not called
at least once in every 5 sec, some Actions should be taken.


More information about the erlang-questions mailing list