[erlang-questions] Question on "selective receive"

Ludovic Demblans ludovic@REDACTED
Sun Jan 19 23:57:16 CET 2014


Hi,

You are talking about the 'after' clause of a receive expression. It can  
only have integers as clauses, starting from 0 to infinity, and a special  
value 'infinity' literally, which is the default.

So it cannot fail, these are not guards, it is just a time in  
milliseconds, and the receive expression value is the 'after' clause value  
if no pattern of the receive clause is satisfied in the duration.

(sorry for bad englih, i hope this is readable ;) )


Le Sun, 19 Jan 2014 11:28:12 +0100, Avinash Dhumane  
<avinash_dhumane@REDACTED> a écrit:

> Can the timeout clause not have a guard too?
>
>
> If it can, what are the semantics of it? I mean, if the timeout occurs  
> but
> guard evaluates to false, what happens to receive? Does it continue to
> block?
>
>
> If it cannot, why?
>
>
> Thanks
>
> Avinash
>


-- 
Utilisant le logiciel de courrier révolutionnaire d'Opera :  
http://www.opera.com/mail/



More information about the erlang-questions mailing list