[erlang-questions] gen_server call and reply

Anthony Shipman als@REDACTED
Sun Sep 16 15:29:34 CEST 2007


On Sunday 16 September 2007 22:17, Christian S wrote:
> > The documentation doesn't imply that I can do this. Is this something I
> > can rely on?
>
> This is what the documentation says:
> > If the functions returns {noreply,NewState} or
> > {noreply,NewState,Timeout}, the gen_server will continue executing with
> > NewState. Any reply to From must be given explicitly using
> > gen_server:reply/2.
>
> See http://erlang.org/doc/man/gen_server.html#Module:handle_call/3
>
> Or did you mean something else with your snippet?

The documentation says to me that you return noreply and then later you can 
use gen_server:reply to complete the call. I want to do it in the opposite 
order. According to the source code that will work but I'd like to know if 
the OTP people sanction it otherwise it might stop working in future.

-- 
Anthony Shipman                    Mamas don't let your babies 
als@REDACTED                   grow up to be outsourced.



More information about the erlang-questions mailing list