sunnuntaina, kesäkuuta 15, 2008

Erlang process spawning, continued

I forgot to explain why this obsession to use spawn/1 instead of spawn/3. spawn/3 calls the named function in the named module, which means the function must be exported by the module. In my program it felt unnecessary to export the helper function just for the purpose of being able to start a second process to run it. Only start/1 needs to be exported by the pingpong module now and life is good.

Ei kommentteja: