[erlang-questions] gen_server call and reply
Ulf Wiger
ulf@REDACTED
Sun Sep 16 16:34:30 CEST 2007
Ah, well, you _can_ do it. Don't pay too much attention to the
word "after". It's no problem whatsoever calling reply() first,
and then returning {noreply, S}.
BR,
Ulf W
2007/9/16, Anthony Shipman <als@REDACTED>:
> 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.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
More information about the erlang-questions
mailing list