Erlang/OTP Forums

Author Message

<  Erlang questions mailing list  ~  : gen_server call and reply

Guest
Posted: Wed Sep 19, 2007 9:17 am Reply with quote
Guest
I might step into something unplesent here, but...

I think Christian and Matthias ment that Ulf's statement was
an example that demonstrated it must be allowed to call
gen_server:reply/2 both before and after return {noreply,_},
or else it would be unusable.



On Tue, Sep 18, 2007 at 07:09:41PM -0500, Scott Lystig Fritchie wrote:
> >>>>> "ml" == Matthias Lang <matthias@corelatus.se> writes:
>
> ml> Christian S writes:
>
> >> One case that struck my mind is when one spaws a process to do
> >> something and return the value with gen_server:reply/2. That
> >> requires gen_server:reply/2 to need to be executed before the
> >> gen_server:handle_call/3 returns noreply.
>
> ml> That's a good point. That pretty much kills my doubts.
>
> I'm now quite puzzled. Perhaps I haven't had enough coffee today.
>
> Assume the following two timelines, where time advances as we read
> from top to bottom:
>
> gen_server proc helper proc
> --------------- -----------
> start executing handle_call/3
> spawn helper proc
> do stuff for arbitrary time...
> call gen_server:reply/2
> return {noreply, ...}
>
> My understanding of Christian's statement is that this timeline
> results in invalid behavior:
>
> gen_server proc helper proc
> --------------- -----------
> start executing handle_call/3
> spawn helper proc
> do stuff for arbitrary time...
> return {noreply, ...}
> call gen_server:reply/2
>
> If my understanding is correct, then Christian's statement is not
> correct: the server's apparent behavior will be correct in either
> timeline.
>
> -Scott
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@erlang.org
> http://www.erlang.org/mailman/listinfo/erlang-questions

--

/ Raimo Niskanen, Erlang/OTP, Ericsson AB
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Post recived from mailinglist
yeti
Posted: Sat Sep 01, 2012 5:56 am Reply with quote
User Joined: 01 Sep 2012 Posts: 17 Location: fgf
cheap designer *beep* are the most suitable accessories for women who are fond of attending parties.There are different style in our cheap *beep* shop.cheap purses are a kind of practical products and are full of vitality.If you can choose cheap designer bags right now, we can supply all kinds of cheap bags from stock.
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum