Re: [go-nuts] Potential Issue in errgroup

2024-07-02 Thread 'Axel Wagner' via golang-nuts
(sorry, didn't hit "Reply All", apparently) Hi, I don't believe the semaphore has anything to do with the wait group counter. So I don't believe it is relevant to this question. Note that a goroutine can be interrupted at any time anyways, so whether or not that code is there doesn't matter for c

[go-nuts] Potential Issue in errgroup

2024-07-02 Thread Icey
In errgroup, the step to increment the WaitGroup counter (wg.Add) is written after acquiring a token from the semaphore (sem). Is it possible that if all goroutines finish execution and call wg.Done at nearly the same time, the currently blocked goroutines do not immediately call wg.Add due to