chore: remove mutexes
This commit is contained in:
+1
-8
@@ -149,19 +149,12 @@ func (s *Sender) Start() {
|
||||
}
|
||||
|
||||
func (s *Sender) Wait() {
|
||||
s.mu.Lock()
|
||||
done := s.done
|
||||
s.mu.Unlock()
|
||||
|
||||
if done != nil {
|
||||
if done := s.done; done != nil {
|
||||
<-done
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Sender) State() string {
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
|
||||
if s.buf == nil {
|
||||
return "closed"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user