From 7d457490f786faef4ab02c300a1e69c21a6aeb21 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 1 Mar 2017 11:35:22 +0100 Subject: Correct documentation of get_modules message --- lib/stdlib/doc/src/sys.xml | 4 ++-- lib/stdlib/src/gen_event.erl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/stdlib/doc/src/sys.xml b/lib/stdlib/doc/src/sys.xml index 9091a46df9..45171f814d 100644 --- a/lib/stdlib/doc/src/sys.xml +++ b/lib/stdlib/doc/src/sys.xml @@ -83,8 +83,8 @@

If the modules used to implement the process change dynamically during runtime, the process must understand one more message. An example is the gen_event - processes. The message is {get_modules, From}. - The reply to this message is From ! {modules, Modules}, where + processes. The message is {_Label, {From, Ref}, get_modules}. + The reply to this message is From ! {Ref, Modules}, where Modules is a list of the currently active modules in the process.

This message is used by the release handler to find which diff --git a/lib/stdlib/src/gen_event.erl b/lib/stdlib/src/gen_event.erl index ccacf658e9..e55cdddb9a 100644 --- a/lib/stdlib/src/gen_event.erl +++ b/lib/stdlib/src/gen_event.erl @@ -742,7 +742,7 @@ stop_handlers([], _) -> []. %% Message from the release_handler. -%% The list of modules got to be a set ! +%% The list of modules got to be a set, i.e. no duplicate elements! get_modules(MSL) -> Mods = [Handler#handler.module || Handler <- MSL], ordsets:to_list(ordsets:from_list(Mods)). -- cgit v1.2.3