event: concurrently deliver events to each TypeMuxSubscription

This commit is contained in:
Miya Chen 2017-07-14 17:01:24 +08:00
parent bf468a81ec
commit 8a6ca50919

View file

@ -94,7 +94,7 @@ func (mux *TypeMux) Post(ev interface{}) error {
subs := mux.subm[rtyp] subs := mux.subm[rtyp]
mux.mutex.RUnlock() mux.mutex.RUnlock()
for _, sub := range subs { for _, sub := range subs {
sub.deliver(event) go sub.deliver(event)
} }
return nil return nil
} }