|
|
| Author |
Message |
|
| Guest |
Posted: Wed Sep 19, 2007 9:17 am |
|
|
|
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 |
|
|
| Back to top |
|
| yeti |
Posted: Sat Sep 01, 2012 5:56 am |
|
|
|
User
Joined: 01 Sep 2012
Posts: 17
Location: fgf
|
|
| Back to top |
|
|
|
All times are GMT
|
|
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
|
|
|