Can messages be sent to processes interactively?

James Hague <>
Thu May 20 20:47:38 CEST 1999


Craig Dickson wrote:
>
>Well, it does, in a way, since it means the code won't even compile, much
>less work. Most readers will probably stop at that point, and fail to
notice
>the more subtle problem that you didn't export server/0, which I think is
>what caused your original code (pre-simplification) to not work. (Unless
>that's another thing that got messed up in your "simplification", in
which
>case you probably left out the real problem altogether,

I agree, I should have made sure my code still compiled after deleting
that one parameter.  And I knew, as soon as I sent the mail, that I'd get
a response like this.  Ten years of Usenet makes one good at predicting
human nature :)

Yes, I did not realize that server functions always need to be exported. I
see now that spawm() always returns a pid even when the arguments are
nonsensical:  spawn(mud, mud, []).  But everything works fine now and I'm
happily writing concurrent code.

All the best,
James




More information about the erlang-questions mailing list