[erlang-questions] spawn race condition?

Anthony Shipman als@REDACTED
Tue Apr 3 19:01:16 CEST 2007

I have code that looks like this:

call(Phone) ->
    Pid = spawn(?MODULE, init, [Phone]),

    Pid! {startCall, self()},
	callComplete -> {ok, Pid}
	5000 -> false

If I don't have the 100ms delay then the only message that the new process 
receives is the integer 0. It works with the delay. Am I missing something?
Anthony Shipman                    Mamas don't let your babies 
als@REDACTED                   grow up to be outsourced.

More information about the erlang-questions mailing list