diff options
author | Zandra Norman <[email protected]> | 2017-04-24 11:07:36 +0200 |
---|---|---|
committer | Zandra Norman <[email protected]> | 2017-04-24 11:07:36 +0200 |
commit | 37158d81c8a49d77b8ba32dbc560b3064127e24d (patch) | |
tree | 43b00d680f459571b2d3d60b874fbdcfdad62eca /lib/stdlib/doc/src/gen_event.xml | |
parent | 3ab6bcf6f9a44c998610bdf8863c07fb4f221da9 (diff) | |
parent | 9e396c8676e5a7eacbe5e7b2d93ee080298eb8fb (diff) | |
download | otp-37158d81c8a49d77b8ba32dbc560b3064127e24d.tar.gz otp-37158d81c8a49d77b8ba32dbc560b3064127e24d.tar.bz2 otp-37158d81c8a49d77b8ba32dbc560b3064127e24d.zip |
Merge branch 'zandra/stdlib/optional-callbacks/OTP-13801'
* zandra/stdlib/optional-callbacks/OTP-13801:
wx: make wx_object callbacks optional
stdlib: Make gen_fsm callbacks optional
stdlib: Make gen_event callbacks optional
stdlib: Make gen_server callbacks optional
Diffstat (limited to 'lib/stdlib/doc/src/gen_event.xml')
-rw-r--r-- | lib/stdlib/doc/src/gen_event.xml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/stdlib/doc/src/gen_event.xml b/lib/stdlib/doc/src/gen_event.xml index 42e952fd46..56cb7974a2 100644 --- a/lib/stdlib/doc/src/gen_event.xml +++ b/lib/stdlib/doc/src/gen_event.xml @@ -579,6 +579,13 @@ gen_event:stop -----> Module:terminate/2 <v>Extra = term()</v> </type> <desc> + <note> + <p>This callback is optional, so callback modules need not export it. + If a release upgrade/downgrade with <c>Change={advanced,Extra}</c> + specified in the <c>.appup</c> file is made when <c>code_change/3</c> + isn't implemented the event handler will crash with an <c>undef</c> error + reason.</p> + </note> <p>This function is called for an installed event handler that is to update its internal state during a release upgrade/downgrade, that is, when the instruction @@ -759,6 +766,12 @@ gen_event:stop -----> Module:terminate/2 <v> Id = term()</v> </type> <desc> + <note> + <p>This callback is optional, so callback modules need not + export it. The <c>gen_event</c> module provides a default + implementation of this function that logs about the unexpected + <c>Info</c> message, drops it and returns <c>{noreply, State}</c>.</p> + </note> <p>This function is called for each installed event handler when an event manager receives any other message than an event or a synchronous request (or a system message).</p> @@ -815,6 +828,11 @@ gen_event:stop -----> Module:terminate/2 <v> Args = Reason = Term = term()</v> </type> <desc> + <note> + <p>This callback is optional, so callback modules need not + export it. The <c>gen_event</c> module provides a default + implementation without cleanup.</p> + </note> <p>Whenever an event handler is deleted from an event manager, this function is called. It is to be the opposite of <seealso marker="#Module:init/1"><c>Module:init/1</c></seealso> |