[erlang-questions] : Subtle behaviour of Erlang scheduler

Ulf Wiger (TN/EAB) ulf.wiger@REDACTED
Mon May 28 16:50:19 CEST 2007

Raimo Niskanen wrote:
> I guess the solution for the problem at hand would be to make 
> sure all code for the high priority processes are loaded 
> before they are started, e.g by calling Module:module_info/0 
> on them. That trick is done by the code server itself to 
> ensure it can start without a running code server.

For those who actually build OTP boot scripts, the command
line flag '-mode embedded' does the trick. In our experience,
it also has the effect of significantly shortening the 
startup time.

The drawback is that you must then explicitly load new 
modules to avoid getting 'undef' errors when calling 
them. This can be awkward during testing. There used to be
a -mode test, which loaded all code in the boot script,
but then enabled interactive code loading. I don't know
when it was removed, but I can't find it in any recent
OTP (I went back as far as R5B, which shows how often 
I've been using that feature. ;)

Ulf W

More information about the erlang-questions mailing list