[erlang-questions] process will stack overflow after received many message?
Jovi Zhang
bookjovi@REDACTED
Fri Sep 16 10:38:52 CEST 2011
Hi,
I am a newbie of Erlang, here I have a question for receive
message in Erlang loop.
Like below Erlang code, when process receive one message, it will
invoke loop again,
then it can service like a server, receive message forever.
BUT is possible that process will stack overflow after receive too
many message? the process invoke loop again and again.
I saw there have many code write like this in <<Programming Erlang>> book.
loop() ->
receive
hello ->
io:format("hello\n"),
loop();
Other ->
io:format("I don't know what is this message, ~p is ~n" ,[Other]),
loop()
end.
More information about the erlang-questions
mailing list