chore: remove mutexes

This commit is contained in:
infastin
2025-04-05 13:50:02 +05:00
parent 0669cfbebf
commit 487527f5a5

View File

@@ -149,19 +149,12 @@ func (s *Sender) Start() {
} }
func (s *Sender) Wait() { func (s *Sender) Wait() {
s.mu.Lock() if done := s.done; done != nil {
done := s.done
s.mu.Unlock()
if done != nil {
<-done <-done
} }
} }
func (s *Sender) State() string { func (s *Sender) State() string {
s.mu.Lock()
defer s.mu.Unlock()
if s.buf == nil { if s.buf == nil {
return "closed" return "closed"
} }