I have code that looks like this:
call(Phone) ->
Pid = spawn(?MODULE, init, [Phone]),
util:delay(100),
Pid! {startCall, self()},
receive
callComplete -> {ok, Pid}
after
5000 -> false
end.
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
grow up to be outsourced.