embedded timeouts

info info@REDACTED
Mon Jul 5 11:01:24 CEST 2010


Hi all,
Why the first timeout never happens ?
How must be structured this code in order to have two timeouts ?

init(Timeout)->
   receive
     ...
     loop(),
     after Timeout ->
     ...
   end.

loop()->
   ...
   send(Message),
   receive after 1000 -> 0 end
loop().


More information about the erlang-questions mailing list