Suggested Example/ emacs questions

Luke Gorrie <>
Tue Oct 10 11:29:48 CEST 2000


Ulf Wiger <> writes:

> System messages are much harder. How to accomplish the suspend/
> code_change/resume functionality, as well as the ordered shutdowns,
> without messing up the normal program?
> 
> I've been wishing for some kind of "protected mode" section, where
> I can write hooks to modify message reception; system messages 
> would then be somehow pre-empted by OTP, unless I explicitly state
> that I want to see them.

Another dubious possibility I was thinking of is inline'ing all the
system message handling with a macro, like:

  receive
    pop when Empty == false -> ...;
    {push, Item} when Full == false -> ...;
    ?handle_system_messages
  end

Just what that macro would expand to, I've no firm idea :-)

Using non-trivial macros in Erlang doesn't feel good, though.

-Luke




More information about the erlang-questions mailing list