Doubt about funs

Ulf Wiger etxuwig@REDACTED
Wed Feb 21 11:54:45 CET 2001


On Wed, 21 Feb 2001, Martin Bjorklund wrote:

>Ulf Wiger <etxuwig@REDACTED> wrote:
>
>> Since funs are actually made into real functions by the compiler, they
>> seem to have roughly the same properties as ordinary functions during
>> code change. I've run some tests, and it does seem to be the case that
>> as long as the fun is tail recursive (doesn't wait for a return
>> value), then upgrading doesn't break the fun as long as the arity
>> stays the same. This is the same as for ordinary functions.
>
>erik> What you describe will happen in the current implementation if
>erik> the function defining F is changed (or any funs are added or
>erik> removed before the fun defining F). 

Yes, you're right. Adding a fun before a fun referenced by some
process P, will cause P to crash when the old module is purged.

Oops.

/Uffe
-- 
Ulf Wiger                                    tfn: +46  8 719 81 95
Senior System Architect                      mob: +46 70 519 81 95
Strategic Product & System Management    ATM Multiservice Networks
Data Backbone & Optical Services Division      Ericsson Telecom AB




More information about the erlang-questions mailing list