diff options
author | Matthew Sackman <matthew@lshift.net> | 2009-08-06 13:18:06 +0100 |
---|---|---|
committer | Matthew Sackman <matthew@lshift.net> | 2009-08-06 13:18:06 +0100 |
commit | 473e2f458644b5bd7b48c8a8f0e7d7d4a6461164 (patch) | |
tree | 618c793f749756caadb8b47a68762509d1c60798 | |
parent | 98f2a335b6da25baa3f23bb2404b3809301477a5 (diff) | |
download | rabbitmq-server-473e2f458644b5bd7b48c8a8f0e7d7d4a6461164.tar.gz |
documentation
-rw-r--r-- | src/gen_server2.erl | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/gen_server2.erl b/src/gen_server2.erl index 4b610506..6cb5b2af 100644 --- a/src/gen_server2.erl +++ b/src/gen_server2.erl @@ -36,11 +36,11 @@ %% is unable to sleep for the DesiredHibernatePeriod. If it is able to %% sleep for the DesiredHibernatePeriod it will decrease the current %% timeout down to the MinimumTimeout, so that the process is put to -%% sleep sooner (and hopefully for longer). In short, should a process -%% using this receive a burst of messages, it should not hibernate -%% between those messages, but as the messages become less frequent, -%% the process will not only hibernate, it will do so sooner after -%% each message. +%% sleep sooner (and hopefully stays asleep for longer). In short, +%% should a process using this receive a burst of messages, it should +%% not hibernate between those messages, but as the messages become +%% less frequent, the process will not only hibernate, it will do so +%% sooner after each message. %% %% Normal timeout values (i.e. not 'hibernate') can still be used, and %% if they are used then the handle_info(timeout, State) will be @@ -49,6 +49,11 @@ %% immediately, as it would if backoff wasn't being used. Instead %% it'll wait for the current timeout as described above, before %% calling handle_pre_hibernate(State). +%% +%% 6) When the backoff is not being used (see (5) above), the module +%% can optionally implement handle_pre_hibernate/1 and +%% handle_post_hibernate/1. If they are implemented then they will be +%% called immediately prior to and post hibernation, respectively. %% All modifications are (C) 2009 LShift Ltd. |