Big state machines
Vance Shipley
vances@REDACTED
Sat Apr 23 00:16:52 CEST 2005
On Fri, Apr 22, 2005 at 10:09:49PM +0200, Ulf Wiger wrote:
}
} I think this is somewhat analogous to having a gen_fsm that
} performs a gen_server:call() in one of its callbacks.
But is that desired functionality? I'm thinking not.
On the other hand with my method you can have it that way if
you wish.
} It's probably a good idea to always have the ?SYSTEM
} and ?EXIT macros present, and writing it symmetrically
} like you've done. Then, of course, one could discuss
} whether they need to be two separate macros, but
} OTOH that might serve to clarify what's happening.
My thinking was that instead of hiding the system messages I
wanted the coder to think about how these messages should be
handled. It might be that you wanted to defer EXIT processing
briefly for instance but still handle system messages.
-Vance
More information about the erlang-questions
mailing list