Closed letitbezh closed 2 years ago
Hello,
The set implementation has two APIs for iteration with Iter
being one and Each
being the other.
The Iter
api has a design flaw where you may leak goroutines if you early-return without finishing the consume of it.
The Each
does not have this problem. Alternatively you can still use Iter
as long as you make sure to iterate completely without stopping early.
Thanks for your answer。 i will try to fix my problem
Thanks for your answer, i have fixed my problem
I have use this program in my code,but this cost too many goroutines,how can i solve it