[erlang-questions] The trouble with measurements

Richard Carlsson richardc@REDACTED
Thu Oct 9 22:08:24 CEST 2008


Joel Reymont wrote:
> 
> On Oct 9, 2008, at 4:58 PM, Richard Carlsson wrote:
> 
>> So why didn't anyone notice the timeout? Well, because of timer:tc(),
>> of course, which runs the call within a catch! So, what the timer really
>> measured for the lookup loop, was the time for the first gen_server:call
>> to time out, namely, five seconds.
> 
> Ouch! It works properly with call instead of cast, though, do I
> understand you correctly?

Yes, if all the ADD requests are also done with gen_server:call(),
the test process cannot run ahead of the server like it does now.

    /Richard



More information about the erlang-questions mailing list