vformat supports multi-core processing (#757)

* Feat: vformat supports multi-core processing (#996)

Co-authored-by: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
This commit is contained in:
yuhan6665 2021-10-12 11:29:22 -04:00 committed by GitHub
parent a97d45c93a
commit 3554886ce1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 23 deletions

View file

@ -87,8 +87,7 @@ func (s *Service) Subscribe(name string) *Subscriber {
done: done.New(),
}
s.Lock()
subs := append(s.subs[name], sub)
s.subs[name] = subs
s.subs[name] = append(s.subs[name], sub)
s.Unlock()
common.Must(s.ctask.Start())
return sub