diff --git a/events.go b/events.go index 1b1d00a..701a7bc 100644 --- a/events.go +++ b/events.go @@ -78,6 +78,11 @@ func (e *ChannelEmitter) Events() <-chan Event { return e.ch } +// Close closes the underlying channel, signalling consumers to stop reading. +func (e *ChannelEmitter) Close() { + close(e.ch) +} + // MultiEmitter fans out events to multiple emitters. Emission continues even // if one emitter fails — errors are collected but not returned. type MultiEmitter struct {