aboutsummaryrefslogtreecommitdiffstats
path: root/event
diff options
context:
space:
mode:
Diffstat (limited to 'event')
-rw-r--r--event/event.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/event/event.go b/event/event.go
index 20d20d1f5..423278731 100644
--- a/event/event.go
+++ b/event/event.go
@@ -180,6 +180,12 @@ func (s *TypeMuxSubscription) Unsubscribe() {
s.closewait()
}
+func (s *TypeMuxSubscription) Closed() bool {
+ s.closeMu.Lock()
+ defer s.closeMu.Unlock()
+ return s.closed
+}
+
func (s *TypeMuxSubscription) closewait() {
s.closeMu.Lock()
defer s.closeMu.Unlock()