[erlang-questions] Killing a genserver

BJörn Lindqvist bjourne@REDACTED
Thu Oct 30 17:05:46 CET 2008


2008/10/30 Peter Lemenkov <lemenkov@REDACTED>:
> Better way is to define function:
>
> handle_cast(stop, State) ->
>   {stop, {reason, "Just received stop message"}, State}.
>
> and send a proper message to server:
>
> gen_server:cast({local,kil}, stop).

That requires a cooperative genserver which I can't guarantee.


-- 
mvh Björn



More information about the erlang-questions mailing list