[erlang-questions] max timeout

Serge Aleynikov saleyn@REDACTED
Tue Aug 19 13:39:53 CEST 2008


Matt, thanks, that was the thread!  And this was Ulf's statement that 
seemed to have settled in my memory:

"...you cannot use timeout values that are larger than a smallint."
http://www.erlang.org/pipermail/erlang-questions/2008-February/032625.html

So from that thread and your "executive summary" below, it's still not 
clear which one is the upper limit for the timeout:

1. 2^32 (this is what's documented, but only seems to work in the shell)
2. 2^32-1 = 49.5 days
3. Erlang's small integers (2^27-1 = 1.5 days)

I still claim that the reference manual documentation ch. 6.10 is not 
accurate and leaves room for questions.

Serge

Matthias Lang wrote:
> On Monday, August 18, Serge Aleynikov wrote:
> 
>> 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.
> 
> This may be the thread you remember, it starts here:
> 
>   http://www.erlang.org/pipermail/erlang-questions/2008-February/032609.html
> 
> Executive summary: In R11B-2, a timeout of 16#ffffFFFF doesn't work as
>     expected on a 32-bit machine. Something changed between R11B-2 and
>     R11B-5 which made it work in the shell, but still not in compiled
>     code. I haven't noticed anything in the release notes saying it's
>     been fixed for real.
> 
> Matt
> 




More information about the erlang-questions mailing list