[erlang-questions] gen_server behaviour

Ulf Wiger ulf.wiger@REDACTED
Tue May 26 10:54:55 CEST 2009


Christian Axelsson wrote:
> 
>   handle_info(_Message, State) ->
>       gen_server:call(?MODULE, f), {noreply, State}.

Here, the server tries to make a call to itself.
This can never work, since the call() function
will block waiting for a reply, which means that the
same process will not be free to process the request.

Consequently, the call eventually times out, and
the call() function raises an exception.

BR,
Ulf W
-- 
Ulf Wiger
CTO, Erlang Training & Consulting Ltd
http://www.erlang-consulting.com



More information about the erlang-questions mailing list