@@ -36,7 +36,7 @@ defmodule GenEvent do
3636 end
3737 end
3838
39- {:ok, pid} = GenEvent.start_link()
39+ {:ok, pid} = GenEvent.start_link([] )
4040
4141 GenEvent.add_handler(pid, LoggerHandler, [])
4242 #=> :ok
@@ -53,7 +53,7 @@ defmodule GenEvent do
5353 GenEvent.call(pid, LoggerHandler, :messages)
5454 #=> []
5555
56- We start a new event manager by calling `GenEvent.start_link/0 `.
56+ We start a new event manager by calling `GenEvent.start_link/1 `.
5757 Notifications can be sent to the event manager which will then
5858 invoke `handle_event/2` for each registered handler.
5959
@@ -89,7 +89,7 @@ defmodule GenEvent do
8989 - `{:stop, reason}` - monitored process terminated (for monitored handlers)
9090 - `:remove_handler` - handler is being removed
9191 - `{:error, term}` - handler crashed or returned a bad value
92- - `term` - any term passed to functions like `GenEvent.remove_handler/2 `
92+ - `term` - any term passed to functions like `GenEvent.remove_handler/3 `
9393
9494 * `code_change(old_vsn, state, extra)` - called when the application
9595 code is being upgraded live (hot code swapping).
@@ -251,7 +251,7 @@ defmodule GenEvent do
251251 Invoked when the server is about to exit. It should do any cleanup required.
252252
253253 `reason` is removal reason and `state` is the current state of the handler.
254- The return value is returned to `GenEvent.remove_handler/2 ` or ignored if
254+ The return value is returned to `GenEvent.remove_handler/3 ` or ignored if
255255 removing for another reason.
256256
257257 `reason` is one of:
@@ -261,7 +261,7 @@ defmodule GenEvent do
261261 - `:remove_handler` - handler is being removed
262262 - `{:error, term}` - handler crashed or returned a bad value and an error is
263263 logged
264- - `term` - any term passed to functions like `GenEvent.remove_handler/2 `
264+ - `term` - any term passed to functions like `GenEvent.remove_handler/3 `
265265
266266 If part of a supervision tree, a `GenEvent`'s `Supervisor` will send an exit
267267 signal when shutting it down. The exit signal is based on the shutdown
0 commit comments