From c14a046f40dee9915aa2d3d7d351bd80a630db61 Mon Sep 17 00:00:00 2001
From: Vlad Dumitrescu
Date: Fri, 1 Feb 2013 22:16:09 +0100
Subject: 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.
---
lib/kernel/doc/src/code.xml | 13 +++++++++++++
1 file changed, 13 insertions(+)
(limited to 'lib/kernel/doc/src')
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]),
undefined.
+
+
+
+ The code_server's mode.
+
+ This function returns an atom describing the code_server's mode:
+ interactive or embedded.
+ 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 load_binary/3
+
+
--
cgit v1.2.3