Skip to content

Commit

Permalink
Merge pull request redpanda-data#906 from nibbleshift/optimize-proces…
Browse files Browse the repository at this point in the history
…s-message

call wg.Done() directly instead of deferring
  • Loading branch information
Jeffail authored Oct 20, 2021
2 parents 68801ab + d11d96b commit 6c0e64e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pipeline/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ func (p *Processor) dispatchMessages(msgs []types.Message, ogResChan chan<- type

for _, msg := range msgs {
go func(m types.Message) {
defer wg.Done()
sendMsg(m)
wg.Done()
}(msg)
}

Expand Down

0 comments on commit 6c0e64e

Please sign in to comment.