grpool icon indicating copy to clipboard operation
grpool copied to clipboard

Why do you insert data into the channel and take it out immediately? What's the effect?

Open 1325075688gw opened this issue 4 years ago • 2 comments

https://github.com/ivpusic/grpool/blob/28957a27c9441f178d644aa598bac0aad4dd7bba/grpool.go#L55

1325075688gw avatar Dec 08 '21 09:12 1325075688gw

wait worker stop task(Maybe it's a time-consuming stop) like

                            case <-w.stop:
                                // do somethine
				w.stop <- struct{}{}
				return

valiner avatar Aug 17 '23 03:08 valiner

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.

shgopher avatar Jan 13 '24 13:01 shgopher