[erlang-questions] max timeout

Serge Aleynikov <>
Tue Aug 19 00:12:56 CEST 2008


For some reason I have a vague recollection (that may very well be 
wrong) that when this subject was discussed on the list before the 
actual timeout number was less then 2^32...  I have a case when I need 
to put a process to sleep for up to a couple of days (e.g. not to run on 
a weekend) - in practice I am doing a loop sleep with a smaller timeout 
to compensate for time drifts and clock adjustments, but nevertheless 
this question came up about a practical upper bound.

Serge

Ulf Wiger wrote:
> It does:
> 
> "receive
>     Pattern1 [when GuardSeq1] ->
>         Body1;
>     ...;
>     PatternN [when GuardSeqN] ->
>         BodyN
> after
>     ExprT ->
>         BodyT
> end
> 
> "ExprT should evaluate to an integer. The highest allowed value is
> 16#ffffffff, that is, the value must fit in 32 bits."
> 
> BR,
> Ulf W
> 
> 2008/8/18 Serge Aleynikov <>:
>> I recall this question being asked on the mailing list before, but I
>> can't seem to find that thread.
>>
>> What's the MaxAllowedTimeout that can be specified in the after clause?
>>
>> receive
>> after MaxAllowedTimeout ->
>>     ok
>> end.
>>
>> It would be nice if the section 6.10 of the reference manual would
>> include this info.
>>
>> Thanks.
>>
>> Serge
>> _______________________________________________
>> erlang-questions mailing list
>> 
>> http://www.erlang.org/mailman/listinfo/erlang-questions
>>
> 




More information about the erlang-questions mailing list