gen_server:cast/2 vs !

Vance Shipley vances@REDACTED
Sat Oct 4 02:37:20 CEST 2003


Today I am wondering why I would make an interface to a process
with gen_server behaviour use gen_server:cast/2 to send it's
asynchronous messages.  Why not just <Pid> ! AsynchMessage?

Is it so wrong to have a gen_server process use handle_info for
lots of things?  The gen_servers and gen_fsms which communicate
with my cnodes pretty much have to unless I put a proxy in.

What will I gain from the cast function?

	-Vance



More information about the erlang-questions mailing list