[erlang-questions] gen_server handle_info vs handle_call

Gleb Peregud gleber.p@REDACTED
Wed Jun 9 23:35:03 CEST 2010


Yes

gen_server handles calls, casts and messages in a sequential manner -
it will handle them one by one.

On Wed, Jun 9, 2010 at 23:30, Filipe David Manana <fdmanana@REDACTED> wrote:
> Hello,
>
> Regarding gen_server, I would like to confirm if handle_info is synchronous
> like handle_call, that is:
>
> 1) Process P1 does a gen_server:call(Server, Msg)
> 2) An handle_info call is caused by a process P2 (because it died, was
> spawned by the gen_server which processes flag trap_exit)
> 3) Execution of the handle_info code is not executed until the handle_call
> code (being executed for process P1) finishes
>
> Is this correct?
>
> cheers
>
>
> --
> Filipe David Manana,
> fdmanana@REDACTED
>
> "Reasonable men adapt themselves to the world.
> Unreasonable men adapt the world to themselves.
> That's why all progress depends on unreasonable men."
>


More information about the erlang-questions mailing list