[erlang-questions] gen_server vs gen_fsm

YC <>
Mon Oct 8 22:39:06 CEST 2007


On 10/8/07, Ulf Wiger <> wrote:
>
> > You can't save the actual process, but you can pretty easily save the
> > state data of the process. The thing to keep in mind is that PIDs will
> > change, since it's actually a brand new process after revival.
>
> > If your process is a gen_server, the thing that needs saving could
> > be the whole state variable; for a gen_fsm, it might be the {State,
> Data}
> > tuple. You may want to write pack()/unpack() functions that compress
> > the state somewhat, e.g. removing things that aren't needed for
> > restoring the process later.


Thanks.

Where can I find the definition of the State variable to figure out what's
needed and not needed?

Thanks,
yc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20071008/02223547/attachment.html>


More information about the erlang-questions mailing list