[erlang-questions] : How to get the line number of current executable code?

Raimo Niskanen <>
Fri Aug 22 09:24:48 CEST 2008


On Fri, Aug 22, 2008 at 04:34:08PM +1200, Richard A. O'Keefe wrote:
> 
> On 21 Aug 2008, at 10:16 pm, Andras Georgy Bekes wrote:
> 
> 
: :
> >
> > Now think about a module A using B's BF and B using A's AF. When both
> > functions are removed, there is no legal upgrade order.
> 
> Yes there is.  It's A+B *together.
> I am not saying that this is supported *now*,
> but it could be, and it should be.
> And for the "block compilation" that people keep mentioning,
> it will *have* to be, for this very reason.
> 
> You see, when you say "there is no legal upgrade order",
> what that *really* means is that "if you replace modules one
> at a time, there can be unavoidable windows when the system
> is in an inconsistent state, does not know that, and tries
> to continue operations anyway."  Does that sound like a good idea?

I just want to point out, for the record, that the problem
is not completely unsolvable today. This is what the
OTP Release Handler does.

If you build your system using OTP mechanisms (gen_servers,
supervision trees, etc...) the release handler pauses
all processes (in their gen_servers) before upgrading all
modules belonging to an application, and then lets
them continue after the upgrade.

It is just not a language feature, and requires discipline.

>
>
:


-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list