grpool
grpool copied to clipboard
Why do you insert data into the channel and take it out immediately? What's the effect?
https://github.com/ivpusic/grpool/blob/28957a27c9441f178d644aa598bac0aad4dd7bba/grpool.go#L55
wait worker stop task(Maybe it's a time-consuming stop) like
case <-w.stop:
// do somethine
w.stop <- struct{}{}
return
The previous sending and receiving operation is to transmit the signal to start the stop, and the following sending and receiving operation is to complete the execution.