summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2011-02-12 15:26:31 +0000
committerMatthew Sackman <matthew@rabbitmq.com>2011-02-12 15:26:31 +0000
commitb48aa9ab8154e87ab9b2f376b42e11fe7a6cf85e (patch)
treeb50b682cade7b838ed8bf000748beffcede589bf
parent7f003e72158bff73080e23173d58b0290df30b0c (diff)
downloadrabbitmq-server-bug23829.tar.gz
Added documentationbug23829
-rw-r--r--src/gen_server2.erl9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gen_server2.erl b/src/gen_server2.erl
index 75d7ee8c..94296f97 100644
--- a/src/gen_server2.erl
+++ b/src/gen_server2.erl
@@ -58,6 +58,15 @@
%% hibernate the process immediately, as it would if backoff wasn't
%% being used. Instead it'll wait for the current timeout as described
%% above.
+%%
+%% 7) The callback module can return from any of the handle_*
+%% functions, a {become, Module, State} triple, or a {become, Module,
+%% State, Timeout} quadruple. This allows the gen_server to
+%% dynamically change the callback module. The State is the new state
+%% which will be passed into any of the callback functions in the new
+%% module. Note there is no form also encompassing a reply, thus if
+%% you wish to reply in handle_call/3 and change the callback module,
+%% you need to use gen_server2:reply/2 to issue the reply manually.
%% All modifications are (C) 2009-2011 VMware, Inc.