<div dir="ltr">thank you! Ulf W.<br><br><br><div class="gmail_quote">2008/9/22 Ulf Wiger <span dir="ltr"><<a href="mailto:ulf@wiger.net">ulf@wiger.net</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
It is possible to return {noreply, NewState} in cases when<br>
e.g. the request triggers a background job. The server can<br>
then reply later with gen_server:reply(From, Reply), and<br>
be free to handle other requests in the meantime.<br>
<br>
BR,<br>
Ulf W<br>
<br>
2008/9/22 litao cheng <<a href="mailto:litaocheng@gmail.com">litaocheng@gmail.com</a>>:<br>
<div><div></div><div class="Wj3C7c">> Greetings !<br>
> I read the codes of gen_server.erl and gen.erl in stdlib, the<br>
> gen_server:call/3 invoke process is illustrated as follows:<br>
><br>
> gen_server:call/3 -><br>
> gen:call/3 -><br>
> gen:call/4 -><br>
> gen:do_call/4<br>
><br>
> in the gen:do_call/4, first check if the target Process is exist by invoke<br>
> erlang:monitor/2, if the process is alive then send the message,<br>
> after the messge is sended, invoke the wait_resp_mon/3 to wait the<br>
> response, if the Mod:handle_call return {reply, Reply, State}, then in<br>
> wait_resp_mon/3, we can receive the message and return the Reply to the<br>
> gen_server:call/2 caller. My Question is: If the Mod:handle_call return<br>
> {noreply, State}, then I see the gen_server continue the loop, not send any<br>
> message to caller, in that case I think the wait_resp_mon/3 will be blocked,<br>
> Factually I know the caller not block! Anyone can give me a explain?<br>
><br>
> thanks!<br>
> Best Regards!<br>
><br>
</div></div>> _______________________________________________<br>
> erlang-questions mailing list<br>
> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
> <a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
><br>
</blockquote></div><br></div>