[erlang-questions] Difference between erlang:send_after and timer:send_after?

Attila Rajmund Nohl attila.r.nohl@REDACTED
Wed Jun 30 08:39:39 CEST 2010


2010/6/30, Bernard Duggan <bernie@REDACTED>:
> On 29/06/10 18:17, Fredrik Andersson wrote:
>> These two functions seems to be doing the exact same thing (sending a
>> message after a certain amount of time) but I was wondering why they
>> are both there. Should timer:send_after not be replacing
>> erlang:send_after or am I missing something here?
> Yep - you're missing the bit in the efficiency guide that explains the
> difference :)
> http://www.erlang.org/doc/efficiency_guide/commoncaveats.html#id2262042
>
> If anything, the timer: version should be removed but no doubt that
> would break people's code :)

The usual procedure is to give a "deprecated" warning for a release
and two, then remove it... On the other hand code used to compile
under R13B doesn't compile under R14A, so breakage already happens.


More information about the erlang-questions mailing list