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 | ce687c86b38f8f49bb2861f78afb9ede84c0f2b9 (patch) | |
| tree | 618c793f749756caadb8b47a68762509d1c60798 | |
| parent | d9f616b786c3514ed3bd93df7a5160793fd4bdb5 (diff) | |
| download | rabbitmq-server-git-ce687c86b38f8f49bb2861f78afb9ede84c0f2b9.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 4b610506d7..6cb5b2af79 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. |
