Skip to content
This repository was archived by the owner on Aug 12, 2019. It is now read-only.
This repository was archived by the owner on Aug 12, 2019. It is now read-only.

Support a Stop() method on handlers #24

Description

@phemmer

Some handlers might spin up goroutines, and so we should support a way to shut the handler down when it has been removed.
Keep the Handler interface minimal (Event() only), but do a type assertion on it to see if it has Stop(), and call it.

Note that this might be a little less straightforward, as we want to support removing a handler, and then adding that same handler back (such as if we wanted to interpose a filter).
But some way we need to call Stop() once the handler is no longer used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions