fix simplify code to start using context (#9350)

This commit is contained in:
Harshavardhana
2020-04-16 10:56:18 -07:00
committed by GitHub
parent 787dbaff36
commit 69fb68ef0b
13 changed files with 141 additions and 152 deletions

View File

@@ -50,7 +50,7 @@ func (ps *PubSub) Publish(item interface{}) {
}
// Subscribe - Adds a subscriber to pubsub system
func (ps *PubSub) Subscribe(subCh chan interface{}, doneCh chan struct{}, filter func(entry interface{}) bool) {
func (ps *PubSub) Subscribe(subCh chan interface{}, doneCh <-chan struct{}, filter func(entry interface{}) bool) {
ps.Lock()
defer ps.Unlock()