diff options
author | Vlad Dumitrescu <[email protected]> | 2013-02-01 22:16:09 +0100 |
---|---|---|
committer | Vlad Dumitrescu <[email protected]> | 2013-02-01 22:16:09 +0100 |
commit | c14a046f40dee9915aa2d3d7d351bd80a630db61 (patch) | |
tree | 8b6693ec8bb329eabf4875898754061f846bb2a3 /lib/kernel/doc | |
parent | 68b804f34d4ec420d86953e3f519179a40fbee8f (diff) | |
download | otp-c14a046f40dee9915aa2d3d7d351bd80a630db61.tar.gz otp-c14a046f40dee9915aa2d3d7d351bd80a630db61.tar.bz2 otp-c14a046f40dee9915aa2d3d7d351bd80a630db61.zip |
Add a new function code:get_mode() can be used to detect how the code servers behaves
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 so that we can do the right thing.
Diffstat (limited to 'lib/kernel/doc')
-rw-r--r-- | lib/kernel/doc/src/code.xml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/kernel/doc/src/code.xml b/lib/kernel/doc/src/code.xml index 279c7558bc..a1c3eee6ec 100644 --- a/lib/kernel/doc/src/code.xml +++ b/lib/kernel/doc/src/code.xml @@ -738,6 +738,19 @@ rpc:call(Node, code, load_binary, [Module, Filename, Binary]), <c>undefined</c>.</p> </desc> </func> + + <func> + <name="get_mode" arity="0"/> + <fsummary>The code_server's mode.</fsummary> + <desc> + <p>This function returns an atom describing the code_server's mode: + <c>interactive</c> or <c>embedded</c>. </p> + <p>This information is useful when an external entity (for example, + an IDE) provides additional code for a running node. If in interactive + mode, it only needs to add to the code path. If in embedded mode, + the code has to be loaded with <c>load_binary/3</c></p> + </desc> + </func> </funcs> </erlref> |