func (s *Scoped) FetchDone(ch <-chan *FetchResult) bool {
	s.fetchResultListenersLock.Lock()
	l := s.fetchResultListeners[ch]
	delete(s.fetchResultListeners, ch)
	s.fetchResultListenersLock.Unlock()
	if l != nil {
		// Unregister the chan
		s.gun.unregisterMessageIDListener(l.id)
		s.gun.unregisterMessageSoulListener(l.parentSoul)
		// Close the message chan and the result chan
		close(l.receivedMessages)
		close(l.results)
	}
	return l != nil
}
// FetchDone is called with a channel returned from Fetch or FetchRemote to stop
// listening and close the channel. It returns true if it actually stopped
// listening or false if it wasn't listening.
FetchDone is called with a channel returned from Fetch or FetchRemote to stop
listening and close the channel. It returns true if it actually stopped
listening or false if it wasn't listening.
// FetchDone is called with a channel returned from Fetch or FetchRemote to stop // listening and close the channel . It returns true if it actually stopped // listening or false if it wasn ' t listening .
func (s *Scoped) FetchDone(ch <-chan *FetchResult) bool {
	s.fetchResultListenersLock.Lock()
	l := s.fetchResultListeners[ch]
	delete(s.fetchResultListeners, ch)
	s.fetchResultListenersLock.Unlock()
	if l != nil {
		s.gun.unregisterMessageIDListener(l.id)
		s.gun.unregisterMessageSoulListener(l.parentSoul)
		close(l.receivedMessages)
		close(l.results)
	}
	return l != nil
}
func ( s * Scoped ) FetchDone ( ch <- chan * FetchResult ) bool { s . fetchResultListenersLock . Lock ( ) l := s . fetchResultListeners [ ch ] delete ( s . fetchResultListeners , ch ) s . fetchResultListenersLock . Unlock ( ) if l != nil { s . gun . unregisterMessageIDListener ( l . id ) s . gun . unregisterMessageSoulListener ( l . parentSoul ) close ( l . receivedMessages ) close ( l . results ) } return l != nil }
FetchDone is called with a channel returned from Fetch or FetchRemote to stop
listening and close the channel.
FetchDone is called with a channel returned from Fetch or FetchRemote to stop listening and close the channel .
// Unregister the chan // Close the message chan and the result chan