You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 12, 2019. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 hasStop()
, 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.The text was updated successfully, but these errors were encountered: