Skip to content

Provide watcher handlers in the GenEvent module #2662

@josevalim

Description

@josevalim

Basically the idea is: should we provide the watcher handlers functionality as part of GenEvent?

If so, we need to APIs, one that starts the GenEvent handler along side its GenServer to be embedded as part of a supervision tree and another that starts it directly in a given supervision tree. I thought about the name add_watched_handler/3 (I would prefer add_sup_handler/3 but that would cause confusion with Erlang's) and have the :sup option when you want to embed it on a particular supervisor.

/cc @fishcakez

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions