Skip to content

Commit

Permalink
Reset pool slice (#2640)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanhuhta authored Nov 3, 2023
1 parent e6cfae7 commit 73b7166
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/golang-push/rideshare/utility/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (c *workerPool) resetWithoutLock() {
c <- struct{}{}
close(c)
}
c.pool = c.pool[:]
c.pool = c.pool[:0]
}

func (c *workerPool) doWork(fn func(), stop <-chan struct{}, done chan<- struct{}) {
Expand Down

0 comments on commit 73b7166

Please sign in to comment.