[erlang-questions] valid gen_fsm timeout values

Paulo Sérgio Almeida <>
Tue Nov 27 15:46:06 CET 2007


Hi all,

I noticed all over the gen_fsm documentation that timeouts must be 
greater than 0. E.g.

Return = {ok,StateName,StateData} | {ok,StateName,StateData,Timeout}

Timeout = int()>0 | infinity

Considering that a timeout results in a

receive ... after Timeout ... end

is there any reason for 0 being an invalid timeout or is it just an 
error in the documentation that should be corrected? A 0 timeout can be 
useful to express "continue doing something unless some event has occurred".

Regards,
psa



More information about the erlang-questions mailing list