[erlang-patches] add code:get_mode/0

Vlad Dumitrescu vladdu55@REDACTED
Wed Sep 19 10:05:21 CEST 2012


Hi,

I have a small feature to suggest: add code:get_mode() to detect how
the code servers behaves, returning embedded, interactive or minimal.

Rationale:
    Some applications (like erlide) have code to be loaded dynamically on a
    node. It may be slow to load everything upfront every time, so if the
    node is in interactive mode, we would like to just append to the load
    path. Currently, there is no direct way to detect if the node is running
    in embedded mode or not.

git fetch git://github.com/vladdu/otp.git code_get_mode

https://github.com/vladdu/otp/compare/code_get_mode
https://github.com/vladdu/otp/compare/code_get_mode.patch

Since it is a very small, trivial addition, no tests are provided, but
I can do it on request.

best regards,
Vlad



More information about the erlang-patches mailing list